-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In Chapter 5 (page 97 of the Extreme Mobile PDF) under "Creating a Cocoa Touch Class", the code sample should reference the correct UserDefault (e.g. trackCount). The downloaded code itself is correct, only the book contains the oversight:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
var trackCount = 1
if let bundle = Bundle(identifier:"com.gw.RecordingStudioFW"),
let path = bundle.path(forResource: "RecordingStudio", ofType: "plist"),
let plistDict = NSDictionary(contentsOfFile: path),
let tracks = plistDict.object(forKey: "trackCount") as? Int {
trackCount = tracks
}
if let features = UserDefaults.standard.object(forKey: "iaps") as? [String: Any],
let tracks = features["trackCount"] as? Int {
trackCount = tracks
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels