Errata

Swift Development with Cocoa

Errata for Swift Development with Cocoa

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
PDF
Page xii
3rd para

"In Objective-C, for example, it’s possible for an object to change, at run-time, which code gets run when a certain method gets called, which isn’t possible in C++."

Is this significantly different from C++ virtual functions?

Note from the Author or Editor:
It is different, but the section has been updated to remove this phrasing.

Ken Hommel  Sep 22, 2014 
PDF
Page 17
Item #4

The first two lines of code in Item #4, under @IBAction run past the edge of the page on the right and it is impossible to enter the code.

Anonymous  Oct 19, 2014 
PDF
Page 17
3rd paragrapjh (2nd pragraph under point "1."

The assistant icon is described as interwining circles icon.
I don't remember what it looked like in the beta version, but in production XCode 6.1 it looks like a servant's vest.

Note, too, that "intwining" should be "intertwining" although that corrected spelling would still be an incorrect description.

Bradley Kliewer  Oct 19, 2014 
PDF
Page 27
"Note" box

text says

“You can begin a single-line comment with two forward slashes (//), or open a multiline comment using a forward slash and an asterisk (/*) and close it using an asterisk followed by a foward slash (/*).”


That final /* should be a */


Steve  Oct 20, 2014 
PDF
Page 31
5th paragraph. 1st sentence.

Sentence states "Objective-C was designed around the same time as its chief competitor, C.", but the last word should be "C++".

Doug Hoffart  Sep 17, 2014 
PDF
Page 31
last paragraph

last paragraph, third sentence.

"...object-oriented languages like C..." should be
"...object-oriented languages like C++".

Doug Hoffart  Sep 17, 2014 
ePub
Page 38
6


The example below removes the fifth element of the array 'myArray', but the book mention the fourth one.

Either it should be written 'fifth' instead of 'fourth', or the index of the element removed should be 3, not 4.

myArray.insert(5, atIndex: 0)
// = [5,1,2,3,4]

In Swift, arrays start at index 0, which means that removing the fourth element from the array looks like this:

myArray.removeAtIndex(4)
// = [5,1,2,3]

Note from the Author or Editor:
Addressed in next version of early release. Thanks!

Vincent CARLIER  Sep 30, 2014 
PDF
Page 39
Top

The second sentence is missing a word :

"For example, to [add?] methods and properties to the built-in Int type, you can do this:"

Note from the Author or Editor:
Addressed by authors in next version of early release.

Vincent CARLIER  Oct 01, 2014 
PDF
Page 54
top

Stored property "number" is set to 4. However the value printed from the didSet block is "Just changed from 0 to 5!". It should be "Just changed from 0 to 4!".

Learner  Sep 18, 2014 
ePub
Page 65
Australia

The sentence ending:
"... your you’ll need to enable remote notifications in your project."
Should end:
" ... you’ll need to enable remote notifications in your project."
removed the word your.

Grant van Staden  Oct 13, 2014 
PDF
Page 115
Just below code sample

It seems there is a confusion between 'pixels' and 'points'.

The code explanation on the page tells the rectangle in the code example is insetted "by one pixel on the X axis and one pixel on the Y axis".

Isn't that true only on non-retina displays ?
Shouldn't we read 'points' here instead of 'pixels' ?

The word 'pixels' is used several times in this paragraph and also in the "Shadows" section (page 120 in PDF edition), as far as I have read now.

Vincent CARLIER  Oct 08, 2014 
ePub
Page 251
Item 4 - Implement dynamic behavior

In the UI and Gravity section, when I copy/paste the code in item 4 into Xcode, replacing ViewController.swift (outlet is connected to imageView), I get the following error: "Bound value in a conditional binding must be of Optional type". Not sure why. Thanks

Paul  Oct 20, 2014