Errata


#21

The last sentence of the 2nd paragraph says:

s/to/in/

Objective-C: sends the message....to Swift: calls the method.....in


#22

Correct me if I’m wrong, but it looks like you’re missing a “{” after “override func viewDidLoad()”


#23

In the “Creating and retrieving UITableViewCells” section an explanation is given on what the textLabel and detailTextLabel will hook up to.

In the first introduction it describes textLabel == name of the item and detailTextLabel == the serial number of the item.

A line or two down it describes textLabel == name of the item and detailTextLabel == value in dollars.

In the code it seems to agree that value in dollars should be used for detailTextLabel.

Kind Regards,


#24

Figure 11.2 shows some Objective-C code.


#25

PPG 131 - 132
The code for the viewDidLoad() method does not match how we left it in chapter 1.

In chapter 1, we have the line

while in chapter 8, the code appears as follows

let question = questions[currentQuestionIndex]
questionLabel.text = question

While it was pretty easy to correct, it might be confusing for some.


#26

In the middle of the page, the book says:

That wasn’t translated from Objective-C to Swift correctly–you can’t just do a search for “send” and replace it with “call” and expect things to make sense. I think that there are three mistakes in there. It should be:


#27

[size=150]For the More Curious: Application State Transitions[/size]

I’m not sure this falls under the umbrella of errata, because Swift is constantly evolving. In Chapter 15, the section mentioned above, there are four methods in the AppDelegate class we are asked to update as follows:

[code]func applicationWillResignActive(application: UIApplication) {

 print(__FUNCTION__)

}
[/code]

Swift Version 2.2 and the current version of Xcode report that __FUNCTION__ is deprecated and will be removed from the upcoming Swift Version 3.0.

The new syntax is:

[code]func applicationWillResignActive(application: UIApplication) {

 print(#function)

}
[/code]


#28

Chapter 12 Stack Views Page: 192. Nested Stack Views.

I believe there were some steps missing to create horizontal stack views. Thanks.


#29

Please cancel. Reading next paragraph answer my question. Thanks.


#30

On chapter 18, page 300, on the tenth line in the code for longPress(_:slight_smile: there is a missing opening curly brace between “else” and “if gestureRecognizer.state == .Ended”


#31

Chapter 22, p 374.

mainQueueContext.performBlockAndWait({ CODE })

should be

mainQueueContext.performBlockAndWait() {CODE}


#32

Chapter 22, p 376

let tag = tagDataSource.tags[indexPath.row]

is not used in the rest of the didSelectRowArIndexPath function


#33

Oops! That is fixed in the continuation on p 377.

Never mind:blush:


#34

Chapter 16 screenshot 16.11 is correct - field wAny hC should have Fill Equally selected. The book text is slightly misleading - it says ‘change the distribution for this size class to be Fill Equally’ (Distribution should be set to Fill as per screenshot).


#35

I didn’t get it.

What is the misleading part ?


#36

Is there a compiled errata for this book somewhere that I’m missing?


#37

There should be 3 dots instead of 2 dots.


#38

p. 345

At the end of the third line of text, the phrase ‘sure that’ needs to be added:

As a considerate iOS developer, you want to make sure that
your app’s data usage is only what it needs to be.


#39

hmmm. I’m having the same issue.


#40

Well it took me forever to figure this out but I guess I’ll remember it now!

2-finger click on ItemCell so that the list of outlets pops up. Click on the circle to the right of the Label you are connecting. It will turn into a + sign. Drag that to the appropriate label on the storyboard.