By Developers, For Developers

Historical errata for iPad Programming

PDF PgPaper PgTypeDescriptionFixed onComments
15ERROR

In the first paragraph, second sentence, the name of the assignmentAtIndex: method is missing the colon on the end.

2010-04-14
16ERROR

In the paragraph immediately preceding the code for RootViewController.m, first sentence, you say to import Assignments.h into RootViewController.h instead of into RootViewController.m.

2010-04-14
17ERROR

In the first paragraph of section 1.6, second sentence, the colon is missing off of the end of tableView:didSelectRowAtIndexPath:.

2010-04-14
17OK

In the last paragraph, first sentence, you say to double click on the AssignmentViewController nib file. To be consistent with previous instructions, you should say xib file instead of nib file.

2010-04-14Thanks - I'm going to leave this as is (your errata have been wonderful by the way) as I want the reader to feel comfortable if we refer to this either way. \n \nD
36TYPO

In the section of using two delegates, the code for RootViewController shows adding 3 lines to the viewDidLoad method. I have been following the code examples in the book and you have not added a viewDidLoad method to the RootViewController yet. This snippet should show adding the method instead of adding 3 lines to an already existing method.

2010-04-14I fixed this by mentioning the viewDidLoad method earlier - thanks
14TYPO

tableView:numberOfRowsInsection: should be tableView:numberOfRowsInSection:

2010-04-14
11SUGGEST

“So that’s where we’ll start”

Thankyou thankyou thankyou. Not sure if you’ve been undecided as to what assumptions to make about people’s prior skills, but I think you’ve done the right thing here. I’m not reporting an error, just offering my support for the decision you’ve made :)

2010-04-14
61ERROR

In the last paragraph, where it says:

“… like the single tap recognizer. This recognizer begins life in the UIGestureRecognizerStatePossible state, and then as soon as a touch event arrives that is a tap, it simply moves to the UIGestureRecognizerStateChanged state”,

you probably mean the recognizer moves to the UIGestoreRecognizerStateRecognized state.

2010-04-22
66TYPO

In the last paragraph, where it says “We make sure the gesture hasn’t already failed, and if it hasn’t, we return” should be “… and if it HAS, we return”.

2010-04-22
46TYPO

In the third paragraph, second to last sentence, the word “our” is missing. It should read, “Finally, we’ll create our own recognizer …”

2010-04-22
46SUGGEST

On second thought, maybe the second to last sentence in the third paragraph should be something like, “Finally, we’ll create a recognizer to look for our own
custom gesture.” Using the phrase “our own” twice seems awkward.

2010-04-22
47TYPO

In the first paragraph of section 3.2, first sentence, you have an extra word “a” in, “… familiarity of a multi-touch events, …”. It should read, “… familiarity of multi-touch events, …”.

2010-04-22
47SUGGEST

The first sentence in the first paragraph of section 3.2 seems a bit long. You might want to put a period instead of a colon after, “… then understanding the new gesture design is straightforward.” Just capitalizing the next word, “The” creates a perfectly good sentence.

2010-04-22
16SUGGEST

I had to look in the sample code to figure out the instruction “Set the table view’s title to be “Assignments”“. A clearer instruction would be ”Set the table view’s title property to “Assignments” in viewDidLoad:"

2010-04-14
19TYPO

We’ve worked with nib, should be We’ve worked with nibs,

2010-04-14
24TYPO

“Drag these to png files” should be “Drag these two png files”

2010-04-14
27TYPO

“an iPad specific widget:” should be “an iPad-specific widget:”, no?

2010-04-14
33TYPO

“even before the use has selected” should be “even before the user has selected”

2010-04-14
48TYPO

In the last paragraph, you capitalize the word “nib” twice when referring to nib files and in previous references to nib files, you don’t capitalize the word “nib”. I would think all references should not be capitalized.

2010-04-22
39TYPO

“an RootViewController-iPad nib” should be “a RootViewController-iPad nib”

2010-04-14
54TYPO

In the paragraph under the “Testing the Bubble Wrap” heading, last sentence, you have, “… we’ve think this implementation …”. The word “we’ve” should be “we”.

2010-04-22
55ERROR

In the paragraph immediately after the code and in the last paragraph, you refer to the handleSwipeFrom: method without the colon on the end.

2010-04-22
21TYPO

Section 1.9, paragraph 3. Second sentence reads, “This is will produce a binary…”

2010-04-14
56TYPO

In the paragraph after the code snippet, second sentence, there are two problems. The duration should be .75 seconds not .75 second. Then where you say “… subviews are delete” it should be, “… subviews are deleted”.

2010-04-22
58ERROR

In the code for handleTapFrom: which extends onto the next page, the code does not match the code developed so far. This code attaches a tap recognizer action to each bubble image whereas the code developed has code in the main view tap recognizer action to detect a tap on an existing bubble. You should either stick with the previous code or describe the new code and then go with it.

2010-04-22
40TYPO

Last paragraph, “MainMenu-iPad” should be “MainWindow-iPad”.

2010-04-14
59TYPO

In the last paragraph, first sentence, you have some extra words, “the begin”. The sentence should read, “Here’s how it works: as the pinch gesture begins, …”.

2010-04-22
64TYPO

In the paragraph after the code snippet, first sentence, the word “bool” and “strokeMovingUp” are run together.

2010-04-22
65TYPO

In the first bullet item describing the touch methods, the word “finger” should be plural so that it says, “… one or more fingers touch …”.

2010-04-22
65ERROR

All references to the touchesBegan:withEvent:, touchesMoved:withEvent:, touchesEnded:withEvent:, and touchesCancelled:withEvent: methods are missing their final colon.

2010-04-22
66ERROR

All references to the touchesBegan:withEvent: and touchesMoved:withEvent: methods are missing their final colon.

2010-04-22
67ERROR

All references to the touchesEnded:withEvent: and touchesCancelled:withEvent: methods are missing their final colon.

2010-04-22
67TYPO

In the touchesEnded:withEvent: code, the assignment of UIGestureRecognizerStateFailed to self.state uses == instead of =.

2010-04-22OMG, this may be causing a bug I was trying to track down. You'd think after 30 years of programming I would have gotten to the point of not screwing up == vs =. \n \nTHANKS!!!
69ERROR

In the first sentence on the page, the reference to touchesMoved:withEvent: is missing the final colon.

2010-04-22
72SUGGEST

It would probably be a good idea to tell the readers which template you used to create an example app with. When I am reading the book, I go through the exercise of creating the app from scratch and type in all the code by hand. I find that I retain the information better if I do that. I only look at the code you provide as a download if I get stuck on something.

2010-04-22
72ERROR

The BigBuckBunny_640x360.m4v file is missing from the MediaPlayerX projects.

2010-04-22
73ERROR

The @synthesize directive should synthesize viewForMovie instead of player.

2010-04-22
73TYPO

In the paragraph after the @synthesize directive, second sentence, the words “viewForMovie” and “IBOutlet” are run together.

2010-04-22
77TYPO

In the first paragraph of section 4.2, second sentence, you need a space after the comma between “application” and “and”.

2010-04-22
80TYPO

At the end of the first paragraph, it is not clear to me that the word “chapters” should be plural. I saw the note that says you are going to split this information into multiple chapters so maybe being plural is OK.

2010-04-22
78DEFER

In figure 4.3, the location of the label element in the size inspector shows x = 384 when it should actually be 86.

2010-07-25Gotta look into this, strange
83TYPO

In the second paragraph, first sentence, you have an extra word “at”. It should read, “Let’s briefly examine the synchronous method …”.

2010-04-22
84ERROR

In figure 4.4, the size inspector for the scroll view shows x = 384 when it should actually be 64.

2010-07-25same here, bizarre, looking into it
85SUGGEST

In the code for MoviePlayerViewController.h, you have dropped the code for the label and info button. You should probably mention prior to this that you are removing these items from the controller and the associated nib file.

2010-04-22
85TYPO

In the last line on the page, you have used the word “out” when you intended to use “our”. So the last line should read, “… throughout our video …”

2010-04-22
86ERROR

In the code for movieDurationAvailable:, you start off initializing an instance variable that has not been mentioned yet, keyframeTimes. As far as I can tell, this instance variable is not being used anywhere in the code you describe.

2010-04-22
89TYPO

In the first paragraph of section 4.5, third sentence, there is a missing word “to”. The sentence should read, “In this section, we’re going to make use of …”

2010-04-22
92TYPO

In the paragraph after the checkShoutouts: code, second sentence, the words “another” and “NSTimer” are run together.

2010-04-22
89SUGGEST

Before showing the code in viewDidLoad for shoutoutTexts and shoutoutTimes, you might want to mention adding the instance variables to the MoviePlayerViewController.h file. This would probably be a good place to show adding the position instance variable as well.

2010-04-22
91SUGGEST

It is not clear in the text that the NSTimer code for checkShoutouts: should go in viewDidLoad after setting up the two shoutout arrays.

2010-04-22
91ERROR

In the second paragraph after the NSTimer code for checkShoutouts:, you talk about a global variable for position when in the code that you can download, it is an instance variable. Also the initialization of this variable to zero is not shown in the code snippets in the book.

2010-04-22
91SUGGEST

Since isTimeForNextShoutout returns YES/NO, its return type should be BOOL instead of int.

2010-04-22
25OK

“768x1004 pixels”, shouldn’t be 768x1024 ?

2010-04-14No, you have to subtract 20 pixels for which every dimension needs to account for the status bar
54DEFER

The tag that shows in the sidebar of Preview is “4 UIGestureRecognizer and the Swipe Gesture”; the 4 is superfluous.

2010-05-05Should be fixed. Thanks for the catch!
60DEFER

Hi! Problem is in this method from Bubbles4, in Bubbles4ViewController.m:

// START:handlePinchFrom
- (void)handlePinchFrom:(UIPinchGestureRecognizer *)recognizer {
\tCGFloat scale = [recognizer scale];
\tCGAffineTransform transform =
\t\tCGAffineTransformMakeScale(scale, scale);
\trecognizer.view.transform = transform;
}
// END:handlePinchFrom

Method works as expected when you are pinching to ENLARGE the bubble. However, if you subsequently try to SHRINK the same bubble with a “pinch in” gesture, the unexpected result is that the bubble size suddenly reverts to its original size, then shrinks further from there. Here is a solution which produces the result I would expect:

First, in the .h file, one must add an instance vbl:

CGFloat\t\t\tstartingScale;

and create a corresponding property:

@property (readwrite) CGFloat\t\t\tstartingScale;

In the .m file, synthesize the property. Then, modify the handlePinchFrom: method as follows:

- (void)handlePinchFrom:(UIPinchGestureRecognizer *)recognizer {
\tCGFloat scale = [recognizer scale];
\t// capture the current view transform scale factor at the start of the gesture
\t// will be 1.0 if we’re pinching for the first time

\tif (recognizer.state UIGestureRecognizerStateBegan) { \t\tself.startingScale = recognizer.view.transform.a; // should be transform.d and represent current scale factor
\t}
\t
\t// make our scale the product of the starting scale and the one embedded in the current swipe
\tCGAffineTransform transform =
\tCGAffineTransformMakeScale(scale*startingScale, scale*startingScale);
\t
\trecognizer.view.transform = transform;
}

This gives us stretching and shrinking.

2010-07-25Carlos, I'm actually okay with this behavior as I like making very small bubbles as much as I like making the large ones. Did I say something in the text that made you think we can only enlarge? \n \nI'd love to fix an dbe complete, but it just really has too much opportunity to confused the matter at hand. That said, you are totally correct here.
56DEFER

This is really a bug on iPhone OS rather than your code, but it produces unexpected results, so at least it’s worth knowing about:

Problem is with the method
- (void)handleSwipeFrom: on Bubble3ViewController. It’s designed so that a HORIZONTAL swipe produces a HORIZONTAL flip transition. This works as expected when the device is in portrait orientation. BUT, with the actual device in landscape mode, the method is still called in response to a horizontal but not a vertical swipe (good!), but the transition goes vertically, i.e. around a horizontal axis. This feels wrong. As there is no UIViewAnimationTransitionFlipFromTop or UIViewAnimationTransitionFlipFromBottom in UIView, it’s hard to know how to work around this. Thot you should know…

2010-07-25Good catch, going to look at this. \n \nfollow up: great catch but I'm going to let this one stand
78DEFER

- (IBAction)getInfo:(id)sender; is the traditional way of declaring an action method. On iPhone OS there are two other ways. If there is no requirement to query the sender object, I prefer to use the shorter form declaration, like so:

- (IBAction)getInfo;

It’s just a matter of style.

2010-07-25Good with the suggestion, don't want to change in my tired state across 5 versions.
87ERROR

You should be using the constants declared in MPMoviePlayerController.h for the thumbnail notification keys instead of your own constant strings: ie MPMoviePlayerThumbnailImageKey and MPMoviePlayerThumbnailTimeKey.

2010-04-22
92DEFER

Rather than setting up a timer to remove the shout out view, it might make more sense to use performSelector:withObject:afterDelay:, thusly:

[view performSelector:@selector(removeFromSuperview) afterDelay:4.0];

2010-07-25Paul, absolutely open to it, do you have a sense this is the more kosher way given the usage? \n \nI agree this is the more succinct way, but to just be consistent in the book I'm going to leave it as is.
61TYPO

Let’s think about these type types of recognizers in context:

2010-04-22
32TYPO

The first paragraph reads “add an outlet to the Split View Controller”. It should say “add an outlet to the app controller” (or some such).

2010-04-14
32ERROR

In order to get the split view to display properly, I had to ensure that:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
\treturn YES;
}

… was defined in AssignmentViewController.m. Otherwise, the assignments view was coming up in portrait mode, regardless of rotation and the split wasn’t displaying at all.

2010-04-14
45ERROR

The UIWebView webView seems to have some problems functioning in the Split View, I can’t use gestures to move the webview left or right if some of the content happens to be outside the frame of the iPad. I can drag-scroll vertically but not horizontally.

In the DailyShoot app which I built by adding a target to the iPhone app earlier in the chapter, I have no problem both horizontally scrolling the webview, or giving it an instruction to scale the page whenever the ipad is rotated.

2010-04-14Thanks - I've resized the Web View so that it grows properly using the size inspector.
57ERROR

Contrary to footnote 4 on page 57, the simulator can accurately simulate a two-fingered swipe. Hold down OPTION to bring up the two finger guide on the screen, then while holding option, hold shift to move them together. Finally, click and drag while while holding both Option and Shift to perform a two fingered swipe.

Option and the mouse can also be used to simulate pinch and rotate gestures.

2010-04-22Right, i was trying to get this across about taps specifically (or touches other than the pinch gesture). Good catch I'll massage it a bit.
47TYPO

“the new architecture resolves around” Did you mean to write “revolves”?

2010-04-22
47TYPO

“you can instantiate and attached to any view.” should be “attach”

2010-04-22
52TYPO

“the events go to the parent, view, which is our Bub- bles1ViewController’s view.” Lose the comma before “view”

2010-04-22
53TYPO

“it will be on an UIImageView,” should be “a UIImageView”

2010-04-22
68SUGGEST

Shouldn’t handleDelete: be named handleDeleteFrom: to be consistent with the other handle… methods?

2010-04-22
68SUGGEST

This:

if (viewToDelete != nil) {
[viewToDelete removeFromSuperview];
}

can simply be [viewToDelete removeFromSuperview]; since sending a message to nil object is a no op.

2010-04-22Cool thanks
46TYPO

“Apple’s also provided some ready-made gestures for you to use, including taps, pans, pitches” - the last item should be “pinches”

2010-04-22
64TYPO

“Well come back to each of these methods” - the first word should be “We’ll”

2010-04-22It appears as if someone beat me to fixing this ;)
15SUGGEST

Does it really make good sense in an instructional book to have exercise code that contains an instance method and an instance variable that have the same name (assignmentArray)? Or is this some sort of convention in Objective C? I find it just invites confusion for people trying to learn iPHone programming.

2010-04-15
16SUGGEST

Ok, you state that this book’s first two chapters are meant “to get you up and running as an iPhone developer”. So in a book like this for beginners it’s really annoying when you usually are quite explicit in showing us not only the code, but also pointers to new code that’s being added, but then out of the blue you casually state something like this: “Import Assignments.h at the top of RootViewController.h and synthesize the assignments variable. Set the table view’s title to be “Assignments” and return YES from the method shouldAutorotateToInterfaceOrientation:. " WTF? I’m a beginner. So just spell it out like you do the rest of the code, please. If I wanted to be TESTED I’ll take a test, but here I’m paying to LEARN.

2010-04-15This book is specifically targeted at experienced iPhone developers. This is a transition book to take them from iPhone to iPad. The first chapter reviews key concepts from iPhone but is not intended for beginners so we do assume you understand what is meant by "Import Assignments.h at the top of RootViewController.h and synthesize the assignments variable."
75TYPO

“the video content we sent the player to play” I think “sent” should be “want”

2010-04-22
18OK

First paragraph, end of the second full sentence, “outlet to the web view.” should be “outlet to the Web View.” to match the capitalization in the Interface Builder.

2010-04-20I use web view to refer to the widget generically and WebView set in code font to refer to the actual class.
24ERROR

The DailyShoot-Info.plist had an existing key “CFBundleIconFile” I had to delete this and it’s trailing empty string tag before the icon-ipad.png icon showed up in the CFBundleIconFiles array.

2010-04-20
18OK

The following code is missing in the AssignmentViewController implementation:

- (BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation {
return YES;
}

2010-04-23It's not necessarilly missing. I left it out to highlight that in the iPad version it must be accounted for.
36TYPO

In last code example of section 2.3, “We’re going to implement the iPad version of this method in AssignmentViewController.h” should instead be “… AssignmentViewController.m”

2010-04-26
42SUGGEST

In the code snippet from AssignmentViewController.m, when setting barButtonItem.title, rather than assigning it a constant string, it also works to use: “barButtonItem.title = aViewController.title” — this way, if you change the title you assign in the RootViewController’s viewDidLoad method, that change is automatically reflected in the toolbar button.

2010-04-26Thanks - that's a nice catch.
38ERROR

The new toolbar object is being over-retained:
self.toolbar = [[UIToolbar alloc]
initWithFrame:CGRectMake(0.0,0.0,
self.view.frame.size.width, 44.0)];

2010-05-03
62SUGGEST

This is a continuation of #42696, an issue I reported with the beta1 version of Bubbles 4, in the handlePinchFrom: method.

Eric Freeman responded: “Carlos, I’m actually okay with this behavior as I like making very small bubbles as much as I like making the large ones. Did I say something in the text that made you think we can only enlarge?”

Eric, there’s nothing wrong with being able to make tiny bubbles (like Don Ho???). What I find when I test the method as you’ve written is this: when you first make a bubble larger, then try to make THE SAME BUBBLE smaller again by pinching inward, you get a discontinuous shrinkage, with first an instantaneous return to the original bubble size, then further shrinkage from there to a size smaller than the original.

The changes I made to the method are designed to allow one to grow and shrink bubbles at will WITHOUT the sudden jump.

2010-07-25Okay got it. The challenge is I haven't introduce gesture states yet in the pinch discussion, so let me see if it is worth fixing later in the chapter. \n \nThis comment makes sense, and yet it pulls the reader too far away. :(
18SUGGEST

The line
@class Assignments;
is not indicated as an addition to RootViewController.h with the green ‘this is new in this step’ triangle. Not a big deal, but easy to overlook.

2010-05-03
77TYPO

“Current the cargoContainerDidGetTapped method” should be “Currently”

2010-05-03
19SUGGEST

In the third paragraph, first sentence, you start off with, “Create a new UIViewController selecting …”. It would probably be clearer to someone creating this if you said, “Create a new UIViewController subclass selecting …”, as this more closely matches what they will see when the go to Add -> New File.

2010-05-10
26SUGGEST

After editing DailyShoot-Info.plist with emacs, saving the results, and then compiling the project, the icon did not show up. I just saw the blank white icon. After cleaning the target and building, the icon did appear. It seams that Xcode did not notice that the plist file had changed. You may want to mention that people will need to clean the target before building.

2010-05-10
27SUGGEST

In the discussion about supporting multiple orientations, you might want to mention that they should implement shouldAutorotateToInterfaceOrientation: to return YES on the various view controllers. Theoretically, experienced iPhone developers should know this but some won’t.

2010-05-10
19SUGGEST

In the last paragraph on the page, you need to mention that in the attributes inspector for the webView, you should select “Scale Pages To Fit” in order to match the screen shots in the book.

2010-05-10
38SUGGEST

The code fragment in AssignmentViewController.m for tableView:didSelectRowAtIndexPath: implies that just the 3 lines with the arrows in the margin need to be added. Since the method does not exist at all, all the lines need to be entered. Perhaps there should be arrows by all the lines.

2010-05-10
39SUGGEST

In the code fragment for awakeFromNib, if I was writing this for real, I would define a constant like “#define TOOLBAR_HEIGHT 44.0” instead of hard-coding 44.0 everywhere.

2010-05-10
45SUGGEST

In the code for splitViewController:willShowViewController:invalidatingBarButtonItem:, the first line in the method has toolbar as the receiver of the setItems: message. Previously, in splitViewController:willHideViewController:withBarButtonItem:forPopoverController:, you used self.toolbar as the receiver of the setIetms: message. It would probably be a good idea to use self.toolbar in both places.

2010-05-10
47SUGGEST

In the first sentence, when you talk about changing the text for the toolbar button, you might want to mention that it is in the DetailViewController.

2010-05-10
46ERROR

In the code for the DetailViewController, the dealloc method releases the UILabel detailDescriptionLabel. In the downloaded code, I noticed that you just deleted this line instead of replacing it with a line that releases the webView.

2010-05-10
66TYPO

In the second paragraph, second sentence, you have, ‘… add the following methods after right bracket’. Missing the word “the” before the word “right”.

2010-05-10
76TYPO

In the first paragraph of section 3.9, last sentence, you have used the word “you’re” instead of the word “your”.

2010-05-10
77TYPO

In the second sentence on the page, you have an extra word “a” in, “However, for a most common uses, …”

2010-05-10
81ERROR

Right before the last paragraph on the page, after talking about connecting the cargoView outlet, you need to mention that you need to create an outlet in the CargoViewController to hold a reference to the CargoColorChooser instance that was just placed into the CargoViewController nib. Without this, the code in section 4.3 for cargoContainerDidGetTapped will not compile.

2010-05-10
81SUGGEST

When hooking up the setCargoColor: actions to the buttons, you should probably mention that you should connect the “Touch Up Inside” event to the action instead of the default event which is “Value Changed”.

2010-05-11
23TYPO

Section 1.9, third para.: “this is will…”

2010-06-13
83SUGGEST

Footnote 2 at the bottom of the page is not necessary anymore since you mention creating this outlet on the previous page. When I submitted the suggestion that you mention this outlet on the previous page, I had not noticed the footnote on this page.

2010-06-13
83ERROR

In the paragraph before the image of the iPad, you tell the reader to build and run the code. The implementations for dismiss and setCargoColor: have not been written yet so the build will not succeed.

2010-06-13
83ERROR

My mistake on the previous error. The build will succeed but you get warnings about incomplete implementation of the CargoColorChooser.

2010-06-13
82SUGGEST

In the last paragraph where you describe dropping an instance of CargoColorChooser into the CargoViewController nib, you might want to mention that in the attributes inspector, the name of the nib file should be specified and that the Resize View From NIB checkbox is not checked. When I built this project, I did not do this and it took me a little while to sort out what was wrong.

2010-06-13I'm not seeing this -- it worries me because your comments have been so consistently good.
97SUGGEST

In the last paragraph on the page where you describe modifying the MoodKeyboard nib, instead of adding a new view and removing the existing one, you could select the existing view, change the status bar attribute to unspecified and then resize the view to 768 x 95.

2010-06-13Oh cool - thank you
96TYPO

In section 5.1, first paragraph, 4th sentence, the text for the angry emoticon should be >:( instead of >-(.

2010-06-13
100SUGGEST

I think the emoticons in the text area in the FeelingsViewController would look better if the text alignment was centered instead of left justified. Just a suggestion.

2010-06-13
163ERROR

This chapter mentions the VGA adapter, as if it is the exclusive way to attach an external display. Actually, there are also a composite video adapter and a component video adapter available. I believe (though I haven’t yet done a hands-on test) that these can be used in much the same way as the VGA adapter to attach an external display (of a different sort, obviously). If that is the case, these adapters should also be mentioned in the opening paragraph of the chapter, along with wording like “For simplicity, in the rest of this chapter we will assume we are using the VGA adapter.”

There may be some additional considerations with the other adapters. (Certainly the pixel aspect ratio will not always be the same as with the VGA adapter.) If so, these should be covered – or at least mentioned.

2010-06-15
163TYPO

In the last clause of the first paragraph of the chapter, I assume “they’re” should be changed to “you’re”, so “… while they’re looking at a set of notes …” becomes “… while you’re looking at a set of notes …”.

2010-06-15
63SUGGEST

The simulator pinch could be better described.

If you hold your mouse (don’t click), then press option, then you can position the dots before you click. You can move the two dots before you click too, by holding down the shift key at the same time.

2010-06-15
17OK

Towards the end of the page: “Drag it into the Document window to create an instance of Assignments.”

There is no “Document” window in IB. The windows that appear are: RootViewController.xib, TableView, the inspector window and the Library window.

Dragging Assignments.h to RootViewController.xib generates an error: “Parsed 1 source file, no classes found”.

I am using Xcode 3.2.3 with iPhone target 3.2 (same error occurs with target 4.0).

Copying the Assignments.[mh] from the supplied source code does not resolve this.

2010-06-13There is always a "Document" window in IB. Use command-0 to bring it up or Window > Document.
106SUGGEST

As I mention in this book’s discussion forum (“Suggestion: Definition of Hue (as in HSB)”), it might be helpful to have a short section in this chapter on specifying color, and in particular, explaining briefly the meanings of the hue, saturation, and brightness (HSB) parameters (and alpha, for good measure) in calls to some of the UIColor methods. (This ought to be explained in the Apple documentation, but apparently it isn’t, except for alpha.) It might even be helpful to explain how to use the color panel in TextEdit to arrive at numerical HSB values. (See my above-referenced post for details.)

2010-06-13I agree that that's an interesting topic. Unfortunately, it is outside of the scope of this book and, in my opinion, can't really be added to this chapter. \n
17OK

Your .m file is missing a “@synthesize assignments;” statement.

2010-06-13You may have missed it but it's in the RootViewController file where it's needed. \n \nThanks.
18OK

At the bottom of the page, it says: “you should see the assignment numbers in decreasing order in the table view.” The numbers actually appear in increasing order.

2010-06-13If you run the sample code you should see them decreasing. \n \n-- just saw your next comment - thanks, we're on the same page! \n \nD
75TYPO

In the first sentence of section 3.8 it says “…but we’re doing it after siding one finger to the left quite a distance.” Firstly, that should probably be sliding rather than siding. Secondly, the image on the following page shows the finger starting on the left and sliding to the right.

2010-06-15
120TYPO

In the final paragraph on the page it says “(if you’re prefer to really start from scratch…”, this should probably be “(if you prefer…”

2010-06-15
127TYPO

The first paragraph, below the code snippet needs rewriting as it doesn’t make much sense.

“With those additions, return to Interface Builder and connected the onScreenDisplayLabel IBOutlet our new UILabel, and also set the target of the UIButton to the getInfo: IBAction.”

2010-06-15
129TYPO

Second sentence says “Touch the info button; in fact, touch it as many times as you like, and you’ll see the current state of these properties update in as you do.” This should presumably say “…update as you do.”

2010-06-15
141TYPO

First sentence after the code listing: “To store the shoutouts, we’re using to two simple arrays: one for holding…” should be “…using two simple…”

2010-06-15
144TYPO

Middle of final paragraph: “a slider from scrubbing through the video”, from should be for.

2010-06-15
144TYPO

Final sentence starts: “Not bad, but aren’t there are times when you might want to give your users additional functionality” doesn’t need the first “are”.

2010-06-15
152ERROR

init:withPlayer: in the last sentence of the page should be initWithPlayer:

2010-06-15
116ERROR

In the code for the top method, you should probably highlight the code line:

[path addLineToPoint:CGPointMake(–30, –70)];

since it replaces the lines:

[path addLineToPoint:CGPointMake(–5, 70)];
[path closePath];

from the previous version.

2010-06-13
47TYPO

the fourth paragraph on page 47 reads:
“The DetailViewController is taking the place of our AssignmentViewController. Replace its UILabel with the UIWebView; we need both in the DetailView nib file and in the controller’s source code files.”
It should read:

The DetailViewController is taking the place of our AssignmentViewController. Replace its UILabel with the UIWebView; we need to do this both in the DetailView nib file, and in the controller’s source code files.

The distinction is important as the former leads to confusion as to what needs to be changed to complete the exercise.

2010-06-13
48SUGGEST

The modified application is not a real universal application. Because all the iPad related stuff is available only within iPhone OS 3.2 which is not deployable to the iPhone 3G[s]. So I think there should a note, that all the new stuff should enclosed with conditional statements of
#if _IPHONE_3_2 <=_IPHONE_OS_VERSION_MAX_ALLOWED
…
#endif.
to deploy the sample also to the iPhone.

If the iOS4 will be available this conditionals could be obsolete.

2010-06-13
75SUGGEST

In Bubbles > BubblesViewController.m:
- (void)handleTapFrom:(UITapGestureRecognizer *)recognizer {
// Replace this unsafe book code:
if (hitView != self.view) {
// with:
if ([hitView isKindOfClass:[UIImageView class]]) {
// because this cast is unsafe otherwise:
[(UIImageView*)hitView setImage:[UIImage imageNamed:@“popped.png”]];

2010-07-25Great catch
93OK

In Cargo > CargoViewController.m, use the following to avoid unnecessary UIPopoverController creation and a potential memory leak if garbage collection isn’t used:
-(IBAction)showOrHideDriveControls:(id)sender {
\t// Initialize driveControls only if nil:
\tif (!driveControls) {
\t\tdriveControls = [[UIPopoverController alloc]
\t\t\t\t\tinitWithContentViewController:carDriver];
\t\tdriveControls.popoverContentSize = carDriver.view.frame.size;
\t}
\t// If it is already visable dismiss it:
\tif (driveControls.popoverVisible==YES) {
\t[driveControls dismissPopoverAnimated:YES];
\t// Otherwise present it:
\t} else {
\t\t[driveControls presentPopoverFromBarButtonItem:sender
\t\t\tpermittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
\t}
}

2010-07-17In the book's code I only create the drive control if it hasn't been.
47ERROR

In DailyShootiPad downloaded code BUG: If you do two rapid rotations to upside down portrait in the simulator, you lose the Assignments button.

2010-06-19That's really interesting - the problem seems to be with the simulator. If I rotate quickly enough I do see the behavior you describe. But, for instance, if I log the toolbar's items I see the bar button item in the log but not on the screen. This is essentially Apple template code.
47SUGGEST

I feel this chapter warrants little more discussion of the differences between Universal and iPad-only design patterns, particularly with regard to shared views in IB. For example, you might note that one must be careful not to specify exact sizes in subviews and check everything’s ‘Autoresize Subview’ Attribute as well as having correct Autosizing View Size… I also think more explicit steps in section 2.8 would be useful for those in a hurry to start an iPad only App.

2010-06-19
47OK

In DailyShoot (iPad-only), you lost the title of the detail page in the DetailViewController. What’s the best way to add this back? I put it back by dropping UILabel in the DetailView.xib, adding an IBOutlet called detailLabel in DetailViewController.h, and adding to DetailViewController.m
- (void)configureView {
\tdetailLabel.text = [NSString stringWithFormat:@“Assignment #%d”, number];
but this is probably not the best way.

2010-06-19What we mainly did in this chapter was really examine the SplitVC template and highlight how to do a universal app to set up iPad only development. So I didn't address this and some other issues to keep us focused - but thanks.
44OK

More and more (as in your book) I’ve seen members’ methods called like this: [self.member method] instead of like this [member method]. For setting the member, I understand, but why bother when you’re calling a method of the member within a class for which the member is explicitly declared?

2010-06-19I use the getter to distinguish when I am accessing the variable directly. Soon the underlying ivar will be supplied by the run time and not explicitly declared in the header.
116OK

In Bezier7 > BezierView.m > - (UIBezierPath *) top { after the bezierPathWithArcCenter call, this is unnecessary:
[path addLineToPoint:CGPointMake(30, –70)];

2010-06-19It may appear that way at first but if you zoom in on the resulting image you'll see that you are making the connection from the wrong side of the bottom if you don't include that last line.
176TYPO

In paragraph one, second sentence, there is a missing word after, “… 5 megabytes of data in a five minute”. Probably you need the the word “period” inserted after the word “minute”.

2010-07-25
176TYPO

In the first paragraph after the “How HTTP Live Streaming works” heading, second sentence, you have a missing word, “to” after the word “dedicated”. The sentence should read, “… that are dedicated to the streaming protocol …”.

2010-07-25
177TYPO

In the first paragraph after the “Segmenting Video” heading, first sentence, you have an extra word “for” in, “… need to do this for several times …”.

2010-07-25
178TYPO

In the second paragraph after the M3U8 example, second sentence, the parenthetical clause starts off with the word “is” when you probably wanted to start off with the word “in”.

2010-07-25
214TYPO

The second paragraph of section 12.2 says “… and you’ll need a way to read from file and write to file”, this doesn’t read quite right, perhaps files should be plural.

2010-07-17
216TYPO

Footnote 5 is not wrapping correctly and the URL is truncated off the side of the page.

2010-07-17
216SUGGEST

Also pages: 27, 28, 104, 159, 196

I noticed on page 216, the use of “pngs” which I think should be PNGs. When I searched for png in the PDF I found inconsistent use of PNG and png in the text (obviously file names should be lowercase png).

2010-07-17
17OK

It could be significantly clearer that you should start by instantiating Assignment class from the iPad, vs Coca, Objective-C class. Doing so yields a stub program that compiles and runs.

2010-07-15
20OK

This is just way too compressed. So far, I note no Document window to drag the Assignment object to (RootViewController.xib works).

What’s needed is to pull a RootViewController object AND an Assignment object into the RootViewController.xib window. It’s then possible to make the designed connections.

XCode developer info:

Developer Information:

Version:\t3.2 (10M2148)
Location:\t/Developer
Applications:
Xcode:\t3.2.2 (1650)
Interface Builder:\t3.2.2 (762)
Instruments:\t2.1 (1208)
Dashcode:\t3.0.1 (330)
SDKs:
Mac OS X:
10.5:\t(9L31a)
10.6:\t(10M2148)
iPhone OS:
3.0:\t(7A341)
3.1:\t(7C144)
3.1.2:\t(7D11)
3.1.3:\t(7E18)
3.2:\t(7B367)
iPhone Simulator:
3.0:\t(7A341)
3.1:\t(7C144)
3.1.2:\t(7D11)
3.1.3:\t(7E18)
3.2:\t(7B367)

2010-07-15It is deliberately compressed. As we say in the text, if it goes too quickly here, this is not the book for you.
37SUGGEST

“If the application does not rotate as you rotate the device, check that you have implemented the method shouldAutorotateToInterfaceOrien- tation: to return YES.”

Had to download the solution to realize I needed this in the AssignmentViewController.m also. Previously method was already added to the RootViewController.m. Suggestion clarify the Assignment.m in the text.

2010-07-17
40SUGGEST

We’ll eliminate this method from the RootViewController class and create two subclasses that implement it.

Might be worth adding an instruction "Go ahead and delete method tableView:didSelectRowAtIndexPath from RootViewController.m

2010-07-17
43ERROR

In DailyShootAppDelegate_Phone.m should you not import “RootViewController_Phone.h” ?

2010-07-17
46TYPO

Use the Identity inspector to change the type of the ActivityViewController object to ActivityViewController_Pad. Both references should be to AssignmentViewController not ActivityViewController

2010-07-17
93/94ERROR

The code works correctly if you are dismissing the popover tapping the Move button. If you dismiss the popover by tapping outside the navigation bar, you’ll need to tap two times the Move button to get the popover again (Missing driveControls = nil when closing the popover).

2010-07-17Thanks - good catch. Fixed it with a delegate method.
12TYPO

In the footnote, you are missing the word “system”. It should read, “At WWDC 2010 the operating system previously …”.

2010-07-15
20SUGGEST

In the paragraph right before the RootViewController.m code, you might want to mention that the RootViewController inherits the title property from UIViewController, one of RootViewController’s ancestors. On the other hand, if this is part of your test to see if the reader has adequate background knowledge to use this book effectively, just ignore this suggestion.

In reference to the other error that says that this is way too compressed, I have to disagree. This level of compression seems about right.

2010-07-15
24TYPO

At the end of the second paragraph, the word “directions” should be singular.

2010-07-15
39TYPO

In the first paragraph of section 2.4, last sentence, the word “if” should be plural. The sentence should read, “… becomes difficult which these if’s sprinkled … ”

2010-07-17
42ERROR

In the code for DailyShootAppDelegate_Phone.m, you have an include for RootViewController.h that is not needed.

2010-07-17
43ERROR

In the code for DailyShootAppDelegate.h, the navigationController instance variable and property are no longer needed.

2010-07-17
43ERROR

In the code for DailyShootAppDelegate_Pad.m, you don’t need to include RootViewController_Pad.h, you don’t need to synthesize the navigationController, and you don’t need to release the navigationController in the dealloc method.

In my previous errata submission, #43992, I erroneously referred to DailyShootAppDelegate.h instead of DailyShootAppDelegate_Pad.h. My apologies.

2010-07-17
48ERROR

In the second paragraph, first sentence, you say to add the popoverController instance variable to AssignmentViewController.h instead of AssignmentViewController_Pad.h.

2010-07-17
36SUGGEST

Since it’s necessary to implement shouldAutorotateToInterfaceOrientation in the AssignmentViewController, it would be desirable to say “implement …” instead of saying “if it doesn’t rotate, you need to implement…”. The point is that you should consistently say what the steps to be taken will be.

2010-07-17
45OK

UIToolBar vice UIToolbar in the code example.

2010-07-16
45OK

Okay, I take it back — it should be UIToolbar. God alone knows why XCode was completing with capital B.

2010-07-16
44TYPO

Halfway down page 44 it says

“Similarly, open the MainWindow-iPhone.xib file in Interface Builder”

This should read

“Similarly, open the MainWindow-iPad.xib file in Interface Builder”

2010-07-17
91ERROR

for some reason the sample code made the popover box take up most of the screen. i replaced
popover.popoverContentSize = cargoColorChooser.view.frame.size;
with
popover.popoverContentSize = CGSizeMake(200, 140);

2010-07-17
46TYPO

Should be AssignmentViewController* instead of ActivityViewController* in "As before, we need to make some adjustments to the MainWindow-iPad nib. Use the Identity inspector to change the type of the ActivityView- Controller object to ActivityViewController_Pad. You will also have to use the Attributes inspector to change the NIB name to ActivityViewCon- troller_Pad.

2010-08-20
228TYPO

Code error:

“…(UIDocumentInteractionController *)controller; {…”
semi-colon (after controller) should be removed. Code should be:
“…(UIDocumentInteractionController *)controller {…”

2010-08-20
228SUGGEST

The semi-colon in the code on this page, as report in #44391, is not actually a bug. However, it is inconsistent as the other code in the book does not use this style convention.

2010-08-20
145TYPO

In section 7.4 (Adding a Playlist): talking instead of talkng

2010-08-23
22ERROR

This line in method tableView:numberOfRowsInSection:

\treturn [self.assignments count];

gives me an error

\t“synthesized property ‘assignments’ must either be named the same as a
\tcompatible ivar or must explicitly name an ivar”

unless I put in the ivar in the header file

\tAssignments *assignments;

I’m aware of some API magic going on here which works in some versions and not others… but I don’t grasp which ones yet.

2010-08-20If you are using the latest version of the simulator with the latest released version of xcode this won't happen. If you are either using an older version of the simulator -or- you are using a preview version of tools (which we can't discuss) then this is currently a problem that will be addressed before it goes final. The code in the book is correct.
18TYPO

In the gray box at the top of the page (2nd paragraph): “you no longer have do declare the ivar”. Shouldn’t that be “you no longer have to declare the ivar”? (Change “do” to “to”).

2010-08-20
238TYPO

Weird characters “ïz ̇£” at the end of the Bibliography section, they make me wonder if the references have been corrupted.

222TYPO

URL in footer 4 is truncated off the side of the page, confirmed by clicking the link.

21SUGGEST

I am not sure how important this is to correct but the source listing for RootViewController.m has an import for AssignmentViewController.h and that code has not been introduced yet. It will be in a few pages but not at this point in the narrative.

2010-09-03
23ERROR

One thing you forgot to mention in the listing for AssignmentViewController.m is to implement shouldAutorotateToInterfaceOrientation: and have it return YES. It is in your code that you can download but not mentioned in the book.

2010-09-03
30SUGGEST

In the paragraph after the XML for the icon files, I noticed that the image did not show up in the iPad simulator. Even though I had cleaned all targets before building the app again, the image did not show up. The iPad simulator was still running from the previous build. The DailyShoot program was not running, I was just at the springboard when I did the clean and build. Closing the simulator and restarting it caused it to have the app icon show up. So, you might want to mention that in addition to cleaning the target, they need to close the simulator.

2010-09-03
35TYPO

In the third paragraph, fourth sentence, you have used the word “targeting” when I think you meant to use the word “target”. The sentence should read, “If we were to solely target the iPad, …”.

2010-09-03
46SUGGEST

For the final print version, you may want to fix the indentation for the dealloc method in DailyShootAppDelegate_Pad.m.

2010-09-03
54TYPO

In the paragraph preceding the RootViewController.m code, last sentence, you say, “Back in RootViewController.h, …”. I believe you meant to say, “Back in RootViewController.m, …”.

2010-09-03
19ERROR

First off, great book. I am kind of new to iPhone and iPad my background is in Windows programming (unfortunately).

I noticed as I was following “Getting Started” section, there are few references to “AssignmentViewController” also in the code samples as well but initially it was mentioned that we are not changing the name of the controller object and leave it as is “RootViewController”.

I believe it is somewhat confusing or may be I’m totally lost.

Cheers,
Ron
mashrouteh@gmail.com

2010-09-03
70TYPO

In the second paragraph, second sentence, you have used the word “an” instead of the word “a”. It should read, “Then, we use scale to create a transformation matrix.”.

2010-09-05
79SUGGEST

This is just a question of consistency. In the code for updating viewToDelete, in the condition part of the if statement, you refer to the instance variable directly but in the body of the if statement, you use the property accessor. Since you are leaning in the direction of always using the property accessors, I would think you would want to correct the condition to test self.viewToDelete. so the code would be:

if (self.viewToDelete == nil) {

78SUGGEST

In the discussion for adding the DeleteGestureRecognizer to the viewDidLoad method of Bubles5ViewController.m, you might want to remind the reader to include the header file DeleteGestureRecognizer.h.

64TYPO

In the last sentence of the paragraph about testing the bubble wrap, you suggest that the user add a popping sound as though you are leaving this as an exercise for the reader. But then in section 3.7 you add the popping sound. This seems to be an inconsistency to me.

2010-09-05
85TYPO

In the last paragraph, third sentence, it looks like the word “reduce” is missing. It should read, “Overall, you’ll find that the new gesture APIs significantly reduce the complexity …”.

2010-09-05
90ERROR

In order to prevent a warning message in cargoContainerDidGetTapped, I had to add a cast to (UIViewController *) on the cargoColorChooser argument. The updated code is:

- (void) cargoContainerDidGetTapped {
\t[self presentModalViewController: (UIViewController *) cargoColorChooser animated: YES];
}

2010-09-03
90ERROR

Ignore the previous erratum #44765. I forgot to import CargoColorChooser.h at the top of CargoViewController.m.

2010-09-03
94SUGGEST

When I added the CargoColorChooser to the CargoViewController nib, it apparently checked the “Resize View From NIB” checkbox. This made the CargoColorChooser very large and not matching the image in the book with the color chooser above the cargo view. Unchecking this fixed the problem. You might want to mention this somewhere.

2010-09-03
95ERROR

In the paragraph after the image of the iPad with the popover to the right of the cargo view, you say that you are going to stick with the UIPopoverArrowDirectionAny value. However, in the code from Popover/Cargo9/Classes/CargoViewController.m that follows after a few paragraphs, the premittedArrowDirections are still left + right.

2010-09-03
98SUGGEST

In the first paragraph where you describe adding a CarDriver to the nib file, you might want to mention that they should uncheck “Resize View From NIB”.

2010-09-03
100ERROR

In order to prevent a compiler warning, you should mention that the reader should add the UIPopoverControllerDelegate protocol to the CargoViewController.

2010-09-03
107ERROR

In the second paragraph, third sentence, you say to set the struts and springs to anchor the view to the left, top, and bottom. In the MoodKeyboard.xib file in Feelings2, the view is actually anchored to the left, right, and bottom which makes more sense.

2010-09-03
98SUGGEST

I have a question. On page 38, you have a 4 step procedure for adding an outlet to a class. It involves defining a property for the outlet. As I was doing the code for the Cargo app, I was following that procedure so that my CargoViewController.h file looked like:

#import <UIKit/UIKit.h>

class CargoColorChooser; class CarDriver;

@interface CargoViewController : UIViewController {
}

property (nonatomic, retain) IBOutlet UIView *cargoView; property (nonatomic, retain) IBOutlet CargoColorChooser *cargoColorChooser;
@property (nonatomic, retain) IBOutlet CarDriver *carDriver;

- (IBAction) showDriveControls: (id) sender;

@end

My question is, do you want to have all your code use the property style for outlets? If so, then you would also want to change references to instance variables in the code to use the self.var accessor.

2010-09-03
132ERROR

The path to the Documents directory has an additional subdirectory. On my machine it was, ~/Library/Application Support/iPhone Simulator/3.2/Applications/0139E651-BFFF-44EB-96F0-2A6F0AB24E02/Documents/Warning.pdf. Each application I had run under the simulator has a directory that looks like a GUID for a parent directory.

2010-09-03
135SUGGEST

I am not sure how consistent you want to be or if you are just showing different ways to get something done. On page 18 you talk about disappearing ivars. Are you meaning to adopt this for all the code?

135SUGGEST

Another question about consistency. In the paragraph after the @synthesize viewForMovie; statement, you describe in great detail how to connect up the new outlet. If the readers have been following along with the code, they have already done this operation many times and the text in the book just says to hook up the outlet. If you assume a level of competency earlier in the book, I find it odd that you spell it out in detail now.

141SUGGEST

The declaration for the getInfo: method is different in the .h file and the .m file. Even though (void) and (IBAction) are the same, I tend to use (IBAction) in both the .h and .m files for consistency.

141TYPO

I know that this is really picky but up to now, all method definitions have had the opening { on the same line as the definition. The code for getInfo: is the first time you have put it on the following line.

142TYPO

In the second paragraph, second sentence, it looks like you are missing the word “a”. It should read, “In our current situation, the controller is loading from a local file, …”.

2010-09-05
145SUGGEST

In the PlaylistController.h listing in the book, you might want to include the @class MoviePlayerViewController; statement.

145TYPO

In the paragraph right before the PlaylistController.m listing, second sentence, you mention that you are going to use the player property. There are two problems. The name is playerController not player, and it isn’t a property, just an instance variable. You also make the same mistakes in the third sentence.

145SUGGEST

In the PlaylistController.h file listing in the book, you might want to include the declaration for the initializer -(id)initWithPlayer:(MoviePlayerViewController *)thePlayer;

145ERROR

In the paragraph after the PlaylistController.m listing, first sentence, you say that you are assigning the player to a local property when actually you are assigning it to an instance variable.

147TYPO

In the second paragraph, second sentence, you added an additional indexPath: segment to the method selector. It should say, “… so we’ve supplied you with an implementation of tableView:cellForRowAtIndexPath: that you can use …”

146ERROR

In building the items array, you use the movieURL:withFileType: method from MoviePlayerViewController and this method has not been mentioned in the text anywhere. It should probably be introduced before the listing for viewDidLoad in the PlaylistController.

155ERROR

In order to avoid a compiler warning in handleTapFrom:, you need to add a cast when assigning the value to imageView. The statement should be:

ImageViewWithTime imageView = (ImageViewWithTime) recognizer.view;

158SUGGEST

Before showing the code for viewDidLoad in MoviePlayerViewController, you should probably mention that the reader should add shoutOutTexts and shoutOutTimes instance variables.

158ERROR

Also before showing the code for viewDidLoad in MoviePlayerViewController, you should probably mention that the reader should add the position instance variable.

159ERROR

The last sentence on the page that talks about comparing the currentPlaybackTime with the shoutout time says it is comparing for “equal to or less than” when actually it is comparing for “equal to or greater than”. Also the wording seems a little ambiguous. I would write the sentence as, “Every time the checkShoutouts method is called by the timer, we’re going to compare the player’s currentPlaybackTime against the current shoutout time, and if the currentPlaybackTime is equal to or greater than the current shoutout time, we’re going to display the shoutout and increment the position.”.

2010-09-05
163TYPO

In the first paragraph, tenth sentence, you have an extra word “a” before the word “obviously”. It should read, “There are obviously a lot of details, …”

2010-09-05
163ERROR

In the paragraph after the “Creating the View” heading, you talk about opening the movieplayer/MoviePlayer6 project however the PlaybackViewController.xib file is not in that project. It is in the movieplayer/MoviePlayer6Start project.

163TYPO

In the paragraph after the PlaybackViewController.xib image, third sentence, you have used the word “sold” instead of “solid” and it looks like you have left out the word “background”. It probably should read, “This is OK too, because the nib interface is sitting against the solid white background, making it …”.

2010-09-05
166ERROR

In the first paragraph of section 8.3 you say to add a new property to PlaybackViewController.h when you are actually adding an instance variable.

168ERROR

In the movieDurationAvailable: method, you use the playbackTimer instance variable without mentioning that you have added it to PlaybackViewController.h.

170ERROR

In the first paragraph, third sentence, you say that you update the selected state of the playPauseButton when the play and pause notifications happen. However, you also update the selected state when the stop notification happens. Is this an error or an oversight?

173SUGGEST

Before the code listing for the playbackSliderMoved: method, you should tell the reader to create the BOOL slider instance variable and explain why it’s there.

173TYPO

Just being picky again. The initial { should be on the same line as the method definition for playbackSliderDone: if you want the coding style to be consistent.

174TYPO

in the code for updatePlaybackTime: there is a triangle next to the line:

playbackSlider.value = playbackTime;

This line was already added on page 171.

2010-09-05
175SUGGEST

Although it is probably obvious, you might want to mention that the gesture recognizer code also goes into viewDidLoad:.

176SUGGEST

Before the code for setControlsTimer you might want to mention that the controlsTimer instance variable should be created in PlaybackViewController.h.

176TYPO

This may be splitting hairs again but in the last paragraph on the page you refer to the controlsTimer instance variable as a property. Since it is not actually declared using @property I would refer to it as an instance variable.

177TYPO

In the first paragraph, the second time you refer to the handleControlsTimer: method you left off the trailing : .

2010-09-05
177TYPO

In the paragraph after the code segments, first sentence, when you refer to the removeControls method, you have added a trailing : where it is not needed.

2010-09-05
190TYPO

In the second paragraph, second sentence, it looks like you are missing the word “to”. It should read, “… how to get a reference …”.

2010-09-05
193ERROR

In the last paragraph, second sentence, you say you are adding the externalScreen property when you are adding it as an instance variable.

194SUGGEST

Since you added the line:

externalScreen = (UIScreen *)[notification object];

to the screenDidConnectNotification: method, shouldn’t you also add the line:

externalScreen = nil;

to the screenDidDisconnectNotification: method? It would seem that this would help the code you are adding later to have a more accurate picture of the state of the external display.

195TYPO

This is just a question. Did you mean to not capitalize the b in the setbackgroundColor: method name?

195SUGGEST

Before the code for the setupExternalScreen method, you should probably mention that they need to define the externalView instance variable;

198TYPO

When looking at the code added in ExternalDisplay3/Classes/ExternalDisplayViewController.m in the viewDidLoad method, the second to last line is:

[viewForMovie addSubview:player.view];

In order to be consistent with the rest of the code you have added, the argument to addSubview: should be self.player.view.

198SUGGEST

Looking at the ExternalDisplay3/Classes/ExternalDisplayViewController.h file and the ExternalDisplayViewController.xib, I notice that you have an outlet for the switch screen button that you don’t connect up. In the interest of uncluttering the code, I would remove it.

200SUGGEST

In both the code listings for the switchMovie method, you always use player as an instance variable but in the viewDidLoad method you referenced it as a property. It would seem that in the name of consistency you would reference it the same way in all places.

204SUGGEST

You might want to mention that you invoke launchServerSession from the viewDidLoad method.

2010-09-03
207SUGGEST

In the first paragraph of section 11.4 where you talk about creating the door outlets, you should also mention that you are creating an array property named doors to hold the doors.

2010-09-03
207SUGGEST

In the MontyHallViewController.xib from montyHall1 you have 3 UIImageView’s to represent the 3 doors. Since by the time you use them in MontyHall2 they are UIButton instances, they should probably either be left out of the MontyHall1 version of the xib or created as UIButton instances in the first place.

2010-09-03
208SUGGEST

In the selectDoor: method, you test isPrizeInPlace to see if it has been set. This code works but it relies on the fact that when an object is allocated, the instance variables are all zeroed. A zero BOOL value is the same as NO but I usually do not rely on this. I would explicitly set this value to NO in the viewDidLoad method.

2010-09-03
208SUGGEST

In the code for placePrizeBehindDoor:, you cast the sender to be of type (UIView ) in order to avoid a compiler warning but since the sender is actually a UIButton, it would make more sense to cast sender to be a UIButton.

2010-09-03
211TYPO

In looking at the code for makeFinalChoice: in ContestantViewController.m, in the first line you cast the sender to (UIView ) so you can access the tag property without a compiler warning. In the last line, you cast sender to (UIButton) for the same reason. In order to be consistent and also because the sender is an instance of UIButton, I would cast sender to (UIButton *) in both places.

2010-09-03
211TYPO

In looking at the code for choose: in ContestantViewController.m, in the first and fourth lines you cast sender to (UIButton ) but in the third line you cast it to (UIView). In order to be consistent I would cast sender to (UIButton *) in all places.

2010-09-03
211SUGGEST

In looking at the code for selectDoor: in ContestantViewController.m, you are testing the value of the hasMadeInitialChoice instance variable relying on the fact that the allocation routine zeroed the instance variables and the 0 equals NO. I would have initialized it in viewDidLoad to NO.

2010-09-03
211SUGGEST

In both the Contestant and MontyHall apps you sometimes use variables of type int and other times variables of type NSUInteger to hold door number values. I would make them all the same type, probably NSUInteger since they are used as index values in a NSArray.

2010-09-03
216TYPO

In looking at the code for textFieldShouldReturn: in PeerChat3, on the 6th line you use [self userName] instead of self.userName which you use everywhere else.

2010-09-03
219SUGGEST

If you use the plist editor, you can type UIFileSharingEnabled for the key as shown and it will work. However if you just want to use the drop down list, the key shows up as “Application supports iTunes file sharing”. Maybe you should show that in your image of the plist editor.

2010-09-03
221SUGGEST

In looking at the code in Feelings7/Classes/FeelingsViewController.m it appears that you did not derive it from the latest version of Feelings6 because the code in the keyboardWillAppear: and keyboardWillDisappear: methods has not had the common code factored out into the matchAnimationTo:, keyboardEndingFrameHeight:, and adjustFrameHeightBy:multipliedBy: methods. You might want to update the Feelings7, Feelings8, and Feelings9 code to the newer keyboard delegate methods.

2010-09-03
228ERROR

I have been trying the technique of copying Mood.txt or iPadBook.pdf into the Documents directory for SingleFile to fake out file syncing without iTunes. I was unable to get the app from SingleFile1 to put up the popup for opening the file in another app. I was unable to get the app from SingleFile2 to preview the PDF file. I have looked over the code in both these apps and it matches what you describe in the book. I am just unable to get the document handling to work.

137TYPO

Towards the end of the page, in the paragraph that starts with “Back from our detour, we’re now going to look at one of the most impor- tant concepts in this chapter: the use of the MPMoviePlayerController’s video property.”, “video property” should read “view property”

20SUGGEST

Date: Sat Oct 2 21:46:34 2010 –0500

p20 The C in MVC, connect the outlet

Took a bit to figure this out.
“Jump over to IB and connect the outlet to the Assignments object in
the RootViewController.xib.” p 20.

First interpretation:
——————————-
Made a connection from the Assignments class to the File’s Owner and
then separated the connection. Used the New Referencing Outlet to
make the connection.

Later Interpretation:
——————————-
This means that the File’s Owner has an ‘assignments’ outlet that
needs to be connected to the ‘Assignments’ class. Open up the
connections for the File’s Owner and see the assignments variable.

36ERROR

On page 36 section 2.1 of P1.0 version of the PDF in the
section just before the sentences:

Save your work. Build and run.

Add something like the following:

In order to prevent chopping off the top half of the text of
the word “Assignments” in the first view of the application
after the splash screen, we use IB to select the
SplitViewController attributes tab. We look under the View
Controller section in the Layout item and set the “Wants
full screen” checkbox. This properly aligns the text the
first time on both Portrait and Landscape views.

[ What follows is just Configuration for this submission…
Setup emacs to handle The Pragmatic Bookshelf Description of
Erratum submission screen:
123456789012345678901234567890123456789012345678901234567890
C-U 60 set-fill column ]

46ERROR

In section 2.5 page 46, after reading “Save all of your changes, build and run, and everything should run as
before.”

To verify my implementation I attempted to open the Project file for code/SplitVC/DailyShoot6 and it would not open.

My XCode is version 3.2.3 64-bit.
Component Versions
Xcode IDE 1688.0
XCode COre: 1691.0
ToolSupport: 1591.0

20ERROR

AssignmentViewController.h is not available at this point (the controller is created on page 22). This causes a build error.

Categories: