Errata

iOS 15 Programming Fundamentals with Swift

Errata for iOS 15 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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
Printed Page 38
the 2nd sentence of the last paragraph

"..., as we did earlier with the inout parameter s that we declared in our implementation of remove(from:character:)."

'remove(from:character:)' should be 'removeCharacter(_:from:)'

Galileo Lyng  Nov 07, 2021 
Printed Page 240
the 1st sentence of the paragraph after the last code snippet

"..., the instance method insert(at:) inserts a single element at the given index."

'insert(at:)' should be 'insert(_:at:)'

Galileo Lyng  Nov 07, 2021 
Printed Page 242
the 3rd sentence of the 1st paragraph

"If you call split(isSeparator:), the parameter is a function that takes a value of the element type and returns a Bool, ..."

'split(isSeparator:)' should be 'split(whereSeparator:)'

'isSeparator' is the internal parameter name, and 'whereSeparator' is the external parameter name or the argument label.

Galileo Lyng  Nov 07, 2021 
Printed Page 250
the 1st code snippet

let arr = UIFont.familyNames.map {
UIFont.fontNamesForFamilyName($0)
}

'UIFont.fontNamesForFamilyName($0)'
should be
'UIFont.fontNames(forFamilyName: $0)'

Galileo Lyng  Nov 07, 2021 
Printed Page 258
the 1st code snippet

...
.shadow.: {
...
}()
...

'.shadow.:' should be '.shadow:'

Galileo Lyng  Nov 08, 2021 
Printed Page 266
near the bottom of the page

'modifyValue(forKey:default:_:)'
'modifyValue(forKey:insertingDefault:at:_:)'
have been renamed to
'updateValue(forKey:default:with:)'
'updateValue(forKey:insertingDefault:at:with:)'

Galileo Lyng  Nov 08, 2021 
Printed Page 278
the 1st and 2nd paragraph

"The let (or var) can appear inside the parentheses or after the case keyword;..."
"If the let (or var) appears after the case keyword, I can add a where clause:"

Even if the let (or var) appears inside the parentheses, a where clause can still be added, such as:
'case .number(let n) where n < 0:'

Galileo Lyng  Nov 10, 2021 
Printed Page 309
the 3rd bullet within 'Privacy Rules'

"A subclass can change an overridden member’s access level, but it cannot even see its superclass’s private members unless they are declared in the same file together."

Even if subclass and superclass are declared in the same file, the subclass cannot see(access) its superclass's private members. Private access restricts the use of an entity to the enclosing declaration, and to extensions of that declaration that are in the same file.

this sub-paragraph should be rewritten as

"A subclass can change an overridden member’s access level, but it cannot see its superclass’s private(not file-private) members even if they are declared in the same file together."

Galileo Lyng  Nov 12, 2021