Chapter 1. Your first iOS application
Figure 1.1. iOS abstraction layers
Figure 1.2. Create your Xcode project.
Figure 1.3. Xcode iOS templates
Figure 1.4. Applications from iOS templates
Figure 1.5. Xcode project options
Figure 1.6. The Xcode interface
Figure 1.8. Project Navigator versus Project in Finder
Figure 1.11. Interface Builder
Figure 1.15. App execution controls
Figure 1.16. Your first app in the simulator!
Chapter 2. Introduction to Swift playgrounds
Figure 2.3. Examples of visual result views
Figure 2.4. Automatically Run and Manually Run
Figure 2.5. Playground console
Figure 2.6. Press Alt and click on the variable to see an inferred variable’s data type.
Chapter 3. Swift objects
Figure 3.2. Non-optional variable can’t equal nil
Figure 3.3. Telephone inheritance
Chapter 4. View controllers, views, and outlets
Figure 4.1. View hierarchy for the distance converter scene
Figure 4.2. Model view controller in distance converter app
Figure 4.3. Distance converter scene
Figure 4.4. Subclassing the view controller
Figure 4.6. Default UIViewController
Figure 4.8. Blank app with a yellow background
Figure 4.9. Initial view controller
Figure 4.10. Window, view, and view controllers
Figure 4.13. Distance converter app
Figure 4.14. Distance converter storyboard
Chapter 5. User interaction
Figure 5.2. Distance converter interface
Figure 5.3. Create control action
Figure 5.4. The three keyboard types
Figure 5.5. Connect Action from Interface Builder
Figure 5.6. Delete the connection.
Figure 5.7. Connect Action from Connections Inspector
Figure 5.8. Touch Views app view hierarchy
Figure 5.10. The responder chain
Figure 5.11. Pan gesture recognizer
Figure 5.12. Create gesture recognizer action
Figure 5.13. View transformations
Figure 5.14. Gesture recognizer with a view controller as a delegate
Chapter 6. Adaptive layout
Figure 6.1. Device point resolutions
Figure 6.2. Device point resolutions with orientation
Figure 6.3. Add-a-book interface
Figure 6.4. Constraint attributes
Figure 6.6. Interface before auto layout
Figure 6.7. Horizontal constraints for the add-a-book scene
Figure 6.8. Create a constraint.
Figure 6.9. Constraints in the Size Inspector
Figure 6.10. Vertical constraints for add-a-book scene
Figure 6.11. Constraint options
Figure 6.12. Auto layout buttons
Figure 6.13. Add constraint in align menu
Figure 6.14. Add constraint in pin menu
Figure 6.15. Adding multiple view constraints in the pin menu
Figure 6.16. Shrunken text fields
Figure 6.17. Preferred behavior when stretching and shrinking+
Figure 6.18. Compression resistance versus hugging
Figure 6.19. Hugging and compression priorities
Figure 6.20. Interface after auto layout
Figure 6.21. NSLayoutConstraint syntax
Figure 6.22. Visual Format Language syntax example
Figure 6.23. NSLayoutAnchor syntax
Figure 6.24. Rotating orientation
Figure 6.25. Autoresizing attributes
Figure 6.26. Autoresizing views in code
Figure 6.27. Default autoresizing
Chapter 7. More adaptive layout
Figure 7.1. Devices and orientation in relations to size classes
Figure 7.2. Multitasking modes in relation to size classes
Figure 7.3. New adaptive layout for ViewsInCode
Figure 7.4. Update constraints when the trait collection changes
Figure 7.5. Spot the difference!
Figure 7.6. Adaptive storyboard checkboxes
Figure 7.7. Add customized value for size class
Figure 7.8. Label customizable attributes
Figure 7.9. Add customization to a constraint
Figure 7.10. Uninstall constraint
Figure 7.12. Uninstalled views and constraints
Figure 7.13. Proposed layout for iPhone landscape
Figure 7.14. Update to bookcase design
Figure 7.15. Spacing: auto layout vs. stack view
Figure 7.16. Stack view properties
Figure 7.17. Stack view horizontal alignment
Figure 7.18. Stack view vertical distribution
Figure 7.19. Embed in Stack view button
Chapter 8. Keyboard notifications, animation, and scrolling
Figure 8.1. The problem with the keyboard
Figure 8.3. Set text field delegate
Figure 8.4. User taps to hide the keyboard
Figure 8.5. The Notification Center
Figure 8.7. Initial project setup
Chapter 9. Tables and navigation
Figure 9.1. Tables in Apple apps
Figure 9.3. Add Table view controller to canvas
Figure 9.4. Move initial view controller arrow.
Figure 9.5. Dynamic prototypes table view
Figure 9.6. Table view controller identity
Figure 9.7. Select Cocoa Touch Class template
Figure 9.8. Create file options
Figure 9.9. Connect table view controller to subclass
Figure 9.10. Table view controller relationships
Figure 9.13. Tap + to add a book.
Figure 9.14. Navigation controller
Figure 9.15. Navigation controller
Figure 9.16. Create Show segue
Figure 9.17. Show segue in action
Figure 9.18. Modal segue in action.
Figure 9.19. Delegate to save book
Chapter 10. Collections, searching, sorting, and tab bars
Figure 10.1. Sort order with segmented control
Figure 10.2. Segment attributes
Figure 10.4. Search controller alternative approaches
Figure 10.5. Removing a row while searching can crash the app!
Figure 10.6. Bookcase collection view
Figure 10.7. Basic collection view
Figure 10.9. Jump bar automatic versus manual file selection
Figure 10.10. Collection view with custom cells
Figure 10.11. Collection view with custom cells
Figure 10.12. Collection view attributes
Figure 10.14. Tab bars in Apple apps
Figure 10.15. Bookcase app with tab bar
Chapter 11. Local data persistence
Figure 11.1. In-app settings are often stored in User Defaults.
Figure 11.2. Data persistence with structured data files
Figure 11.3. Info property list edited two ways
Figure 11.4. Data persistence: archiving objects
Figure 11.5. Data persistence: archiving objects.
Figure 11.6. Create data model file
Chapter 12. Data persistence in iCloud
Figure 12.1. Activate iCloud for your app
Figure 12.2. Ubiquitous key-value store
Figure 12.3. CloudKit container
Figure 12.4. Activate CloudKit, and open dashboard
Figure 12.5. CloudKit dashboard
Figure 12.6. Check CloudKit book record ID
Figure 12.7. CloudKit book record data
Figure 12.9. Push notifications capability
Chapter 13. Graphics and media
Figure 13.2. Asset catalog editor
Figure 13.3. Add images to image set from Finder
Figure 13.5. Add image to tab bar item
Figure 13.7. App icon in the asset catalog and device home screen
Figure 13.8. Launch screens in Apple apps
Figure 13.9. Bookcase launch screen
Figure 13.11. Inspectable custom attribute
Figure 13.12. Star-rating view in Interface Builder
Figure 13.13. View layer with border and shadow
Figure 13.15. View and layer hierarchy of rating view
Figure 13.16. Using UIImagePickerController to photograph a book cover
Figure 13.17. Camera permission dialog
Figure 13.18. Add row to property list
Figure 13.19. Camera button item added to the navigation bar
Figure 13.20. Using UIImagePickerController to select a photo from the photo library
Chapter 14. Networking
Figure 14.1. Request book data from a web service.
Figure 14.2. Model view controller getting book data
Figure 14.3. Create and configure objects for communicating with the web service.
Figure 14.4. JSON data returned
Figure 14.5. Drag folder to the Terminal
Figure 14.6. Fetch Carthage dependencies.
Figure 14.7. Add linked framework
Figure 14.8. Add run script to build phases
Chapter 15. Debugging and testing
Figure 15.1. Xcode debugger in a crash
Figure 15.2. Crash log in console
Figure 15.3. Crash log in console
Figure 15.4. Frame in call stack
Figure 15.6. Connect IBOutlet into the Connections Inspector.
Figure 15.7. IBOutlet connected in the source editor
Figure 15.8. Crash log in the console
Figure 15.10. IBActions in the source editor
Figure 15.11. File and line breakpoint
Figure 15.12. Breakpoint pausing execution
Figure 15.16. Print variable description
Figure 15.17. LLDB command po in the console
Figure 15.18. LLDB command p in the console
Figure 15.19. Examine a variable with data tips
Figure 15.20. Color detection of the book image
Figure 15.21. Debug gauges and CPU report
Figure 15.24. Help page view controller
Figure 15.25. Debug View Hierarchy button in the debug bar
Figure 15.26. Debug View Hierarchy
Figure 15.27. Debug view oriented to 3D
Figure 15.29. Constraints in the Size Inspector
Figure 15.30. Default tests in the Test Navigator
Figure 15.31. Books-Manager.swift target membership
Chapter 16. Distributing your app
Figure 16.1. Adding Apple ID to Xcode
Figure 16.2. Teams and signing certificates
Figure 16.3. Project target signing preferences
Figure 16.4. Development provisioning profile
Figure 16.5. Provisioning profile errors
Figure 16.6. Checking your certificates
Figure 16.7. Checking your App IDs
Figure 16.8. Checking your registered devices
Figure 16.10. Creating an app record in iTunes Connect
Figure 16.11. Uploading build to iTunes Connect
Figure 16.13. Exporting archive
Figure 16.14. iTunes Connect Users
Figure 16.15. iTunes Connect Users
Figure 16.16. Creating an internal test in TestFlight
Figure 16.17. Creating an external test in TestFlight
Figure 16.18. Editable fields in App Information
Figure 16.19. Selecting the price tier for your app
Figure 16.20. Uploading app demo and screeenshots
Figure 16.21. Adding description, keywords, and URLs to Version Information
Appendix A. Project settings
Figure A.3. Edit build setting for a configuration
Figure A.4. Filters and Combined/Levels views for build settings