Programming iOS 14

Errata for Programming iOS 14

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
Page 121-122
code listing spanning both pages

In this code listing (under section "Gradients"), the point coordinates used are inconsistent. Specifically, the coordinates in the 1st half of the listing are out of sync with the ones in the 2nd half. // punch triangular hole in context clipping region con.move(to: CGPoint(10,100)) *should be (90,100) - to match coordinates in 2nd half con.addLine(to: CGPoint(20, 90)) *shoud be (100, 90) ... There are 3 more.

Note from the Author or Editor:
It looks like this got a partial change. For the correct code, see case 4 in

Jeet Parte  Jul 22, 2021 
Page 144
3rd paragraph

"displayLayer:" should be replaced by it's Swift counterpart - display(_:). In bullet point "The view subclass implements an empty draw(_:), along with either displayLayer: or draw(_:in:)."

Note from the Author or Editor:
Quite so, fixed in my copy. Good catch!

Jeet Parte  Jun 23, 2021 
Page 363
2nd paragraph

Maybe meant 'interaction controller' in place of 'transition controller' - "We are asked for our animation controller and our transition controller. We will supply a transition controller ..."

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

Jeet Parte  Jul 22, 2021 
Page 402
2nd paragraph

"In the child view controller scene, ... set the Layout pop-up menu to Translates Mask Into Constraints, ..." No such option? Probably meant 'to Autoresizing Mask'.

Note from the Author or Editor:
Good heads up (the names of these things in the interface do change from time to time).

Jeet Parte  Jul 06, 2021 
Page 525
1st code listing

In this example of tableView(_:moveRowAt:to:), the data model is updated with this line: "self.sections[sec].rowData.swapAt(srcrow, destrow)". That swap call doesn't update the data model as expected - in the table, moving a cell downward a few rows, moves all intermediate cells one position up. swapAt(_:_:) doesn't do that, of course. Maybe that line is a decent substitute for 'update the data model accordingly' but just wanted to point it out for the sake of correctness.

Note from the Author or Editor:
I'll look into this, thanks.

Jeet Parte  Jul 22, 2021 
Page 552
4th paragraph

"Item edgeSpacing An NSLayoutEdgeSpacing object ... " Should be NSCollectionLayoutEdgeSpacing.

Note from the Author or Editor:
Good catch! Fixed in my copy

Jeet Parte  Jul 25, 2021 
Other Digital Version
after Figure 3-5

Written: "the layers all have clipsToBounds set to false* Might be: "the layers all have masksToBounds set to false"

Note from the Author or Editor:
Good catch; fixed now in my mss.

Anonymous  Mar 23, 2021