By Developers, For Developers

Historical errata for Developing for Apple Watch, Second Edition

PDF PgPaper PgTypeDescriptionFixed onComments
33TYPO

First paragraph talks about pickets. The last line has a colon and should show an image of the picker with a highlighted green border.

2016-01-13
43ERROR

guard let with where clause (inside updateDistanceLabel method) should be written as such (with OS 3.2):

func updateDistanceLabel() {
guard let lapTimes = lapTimes, !lapTimes.isEmpty else {
distanceLabel.setText(“No laps finished!”)
return
}

let distance = track.lapDistance * Double(lapTimes.count)

distanceLabel.setText(lengthFormatter.string(fromMeters: distance))
}

Categories: