Errata

iOS 8 Programming Fundamentals with Swift

Errata for iOS 8 Programming Fundamentals with Swift

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 53
page 53, first paragraph, 8th sentence

In PDF edition: page 53, first paragraph, 8th sentence reads:

"Inside the function doThis there no whatADogSays."

The verb "is" appears to be missing from the sentence.

Shouldn't the sentence read: "Inside the function doThis there is no whatADogSays."

Note from the Author or Editor:
Thanks, fixed in my copy.

JeremyFrench  Mar 28, 2015  May 15, 2015
PDF, ePub
Page 56
5th paragraph

Text in this paragraph says:

produces the image of a rounded rectangle of size 45,30.

However the code before, after and elsewhere uses 45,20 (vs 45,30), e.g. CGSizeMake(45,20). So I expect the line should instead read:

produces the image of a rounded rectangle of size 45,20.

Minor, but I scratched my head. Especially as the next sentence is "You don't believe me?" :)

Note from the Author or Editor:
Fixed in my copy.

Egghead Games  Jun 04, 2015 
PDF
Page 78
Section "Int", 3rd paragraph

Page 78, section "Int", 3rd paragraph reads:

"You can write a numeric literal using scientific notation. Everything after the letter e is the exponent of 10; for example, 3e2 is 3 times 102 (300)."

Isn't "e" notation a Double? Shouldn't the Double value be explicitly converted to an Int?

Shouldn't the second sentence (quoted above) read: "Everything after the letter e is the exponent of 10; for example, Int(3e2) is 3 times 102 (300)."

Note from the Author or Editor:
Didn't know this! So weird that I'm adding a full-fledged Warning note.

JeremyFrench  Mar 29, 2015  May 15, 2015
PDF, ePub
Page 91
3rd paragraph

It looks like "hello" was "howdy" in an earlier version of the book and the text explaining find needs to be updated.

The text in my pdf & epub (including 3 previous lines for context):

find reports the index of a character (as an Optional):
let s = "hello"
let ix = find(s,"o") // 4, wrapped in an Optional
All Swift indexes are numbered starting with 0, so 1 means the second element; thus, that code is telling you that "o" is found in "howdy" as its second character.

I suspect the sentence should read:

All Swift indexes are numbered starting with 0, so 4 means the fifth element; thus, that code is telling you that "o" is found in "hello" as its fifth character.

Note from the Author or Editor:
Fixed in my copy.

Egghead Games  Jun 04, 2015 
PDF, ePub
Page 108
2nd paragraph

I think you meant "postfix" not "postix" in the following text:

unwrap the Optional with the question mark postix operator

I.e., I expect it would read:

unwrap the Optional with the question mark postfix operator

Note from the Author or Editor:
Fixed in my copy.

Egghead Games  Jun 04, 2015 
Printed, PDF
Page 218
Second paragraph

„If the reference to an array is mutable, the instance method removeAtIndex removes the element at that index; the instance methods removeFirst and removeLast remove the first and last elements.“

removeFirst method does not exist for Array, only for Set (Swift

Note from the Author or Editor:
You're perfectly right, but of course the situation in Swift 2.0 is different yet again.

Zbyněk Fiala  Jul 28, 2015 
PDF
Page 497
9th Paragraph(?) towards the bottom of the page

On p497 of the PDF the 9th(?) paragraph reads:

Our intention is eventually to unregister the observer; that’s why we’re keeping a reference
to it. It’s natural to do this in viewWillDisappear::
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
NSNotificationCenter.defaultCenter().removeObserver(self.observer)
}

I just wish to determine if it is viewWillDisappear (as per the copy) or ViewDidDisappear (as per the code).

Note from the Author or Editor:
Good catch and certainly I should make this cohere, but of course either will do.

Kevin Chan  May 16, 2015