Chapter 1. Introducing iOS 4 with iPhone and iPad
Figure 1.2. Double-clicking Xcode and iOS SDK starts your installation.
Figure 1.4. Apple provides you with four layers of frameworks to use when writing iOS programs.
Figure 1.5. This hierarchy graph shows a small selection of the classes available in iOS.
Chapter 2. Learning Objective-C
Figure 2.1. Headers and source code files contain distinctive parts of your Objective-C classes.
Chapter 3. Using Xcode 4
Figure 3.1. The Welcome to Xcode window appears when Xcode launches.
Figure 3.2. Choose a template for your new project.
Figure 3.3. Choose options for your new project.
Figure 3.5. Select the project’s Info.plist file to show details in the Editor area.
Figure 3.6. HelloWorldAppDelegate header file and source file under editor assistant view
Figure 3.7. Build and run the application on the iOS Simulator.
Figure 3.8. Running HelloWorld on the iOS Simulator
Figure 3.10. Inspector pane with Identity tab selected
Figure 3.12. Contents of the MainWindow.nib file shown on the dock
Figure 3.14. MainWindow.xib under Interface Builder
Figure 3.16. Using the inspector to update the label’s text, font color, font size, and so on
Figure 3.18. Identity tab under the Inspector window
Figure 3.19. Connection tab showing a web view’s IBOutlets and IBActions
Figure 3.20. Prompt window for adding new files to the project
Figure 3.22. Control-drag from the web view to the app delegate header file to create a new outlet.
Figure 3.23. Dialog box to create the Outlet connection from the nib object to the header file
Chapter 4. Xcode and debugging
Figure 4.1. Create a new Objective-C class under iOS.
Figure 4.2. Choose UIView as the subclass option of the new file.
Figure 4.4. Create a new nib file under Xcode.
Figure 4.5. Organizer window with the Documentation tab selected
Figure 4.6. Select Automatic DeviceProvisioning under the Xcode Devices Organizer window.
Figure 4.7. Fix-it solutions under Xcode
Figure 4.8. Static analysis under Xcode reports a potential leak for an object.
Figure 4.9. Debugger console window
Figure 4.10. The Debugger window with breakpoints on pause
Figure 4.11. How to print out an object’s details in the Debugger console window
Figure 4.12. Breakpoints Navigator window
Chapter 5. Basic view controllers
Figure 5.3. Here you can see exactly what autoresizing looks like.
Figure 5.4. A table view controller controls a table view and its collection of cells.
Figure 5.5. A look at the connections automatically created for a controller’s table view
Chapter 6. Monitoring events and actions
Figure 6.2. UIEvent objects contain a set of related UITouch objects.
Figure 6.4. You’ll connect six objects that you’ll use to report events.
Figure 6.5. Your event responder uses a few graphical elements to report events as they occur.
Figure 6.7. With an IBAction, there’s no code, just a link.
Figure 6.9. A text field and a slider conspire to set the color of the iPhone’s background.
Chapter 7. Advanced view controllers
Figure 7.2. Dragging a tab bar controller to the nib display window creates the tab bar interface.
Figure 7.3. You can customize tab bars to make navigation clear and simple.
Figure 7.6. The navigation controller shown on both the iPad and iPhone
Figure 7.8. Several objects are created in a flipside controller.
Figure 7.9. Interface objects can be connected to a variety of different files.
Figure 7.10. Creating a split view–based application
Figure 7.11. The bookmarks application employing a split view
Figure 7.12. SplitViewController view elements
Figure 7.13. A first look at your bookmark application as shown on an iPad in landscape orientation
Chapter 8. Data: actions, preferences, and files
Figure 8.1. This preferences page was built from scratch on the backside of a flipside controller.
Figure 8.2. This look at system settings reveals some of Root.plist’s PreferenceSpecifiers.
Figure 8.5. Compiled programs contain several directories full of files.
Figure 8.6. The filesaver application with the keyboard activated on both the iPhone and the iPad
Chapter 9. Data: advanced techniques
Figure 9.1. This menu was created directly from a database.
Figure 9.3. A people picker view controller shown on both the iPad and iPhone
Chapter 10. Positioning: accelerometers, location, and the compass
Figure 10.1. The accelerometers measure acceleration in three-dimensional space.
Figure 10.3. The Accelerometer Graph shows movement in all three directions.
Figure 10.4. This simple utility shows off locations and distance.
Figure 10.5. An altitude program measures how high you’ve climbed on a mountain of your choice.
Chapter 11. Media: images and the camera
Figure 11.1. Images can be shown in UIImageViews or in UIViews.
Figure 11.2. The image picker is another preprogrammed controller for your use.
Figure 11.3. The collager displays many photos simultaneously.
Figure 11.4. Printing UI on the iPad and iPhone
Figure 11.5. Printer Simulator under the iOS SDK
Figure 11.6. Printer Simulator screenshot
Figure 11.7. iPrint app running on the Simulator for the iPhone and iPad
Chapter 12. Media: audio and recording
Figure 12.1. The MPMediaPickerController
Figure 12.2. A simple media player interface
Figure 12.3. The talkback interface: a simple record/playback application
Chapter 13. Graphics: Quartz, Core Animation, and OpenGL
Figure 13.1. The iPhone does abstract art.
Figure 13.4. You can change a UIImage without showing it to the user.
Figure 13.5. PhotoDraw can place drawings on pictures.
Figure 13.6. A jet moves across the screen on an iPhone, thanks to Core Animation.
Chapter 14. The web: web views and internet protocols
Figure 14.1. Internet protocols are arranged in a hierarchy.
Figure 14.2. As shown on an iPhone, the thumbnail web views load on the screen.
Figure 14.3. RSS feeds can easily be placed in table views.
Figure 14.4. Complex SDK programs can chain multiple classes.
Chapter 15. Peer-to-peer connections using Game Kit
Chapter 16. Using Event Kit on the iPhone and iPad
Figure 16.1. Calendar app on iPhone and iPad
Figure 16.2. Add the Event Kit framework from the project panel.
Figure 16.3. The Event Kit class structure
Figure 16.4. Birthday application launching on the iPhone and IPad
Figure 16.5. The Birthday application successfully added the new event to the Calendar.
Figure 16.6. EventEditViewController presented as a modal view controller
Figure 16.7. Fetching and displaying events from the device’s Calendar database
Chapter 17. Local and Push notification services
Figure 17.1. Local and push notifications with custom message and badge number
Figure 17.2. The AlarmViewController.xib under Interface Builder
Figure 17.4. The lifecycle of a push notification
Figure 17.5. Configuring the app to receive push notifications
Figure 17.6. Wizard to create a push certificate
Figure 17.7. Provisioning profile form
Chapter 18. The Map Kit framework
Figure 18.1. Adding an MKMapView to your view
Figure 18.2. Connection Inspector for the MKMapView connections
Figure 18.4. mapTypes: (from left to right) MKMapTypeStandard, MKMapTypeSatellite, MKMapTypeHybrid
Chapter 19. In-app purchasing using Store Kit
Figure 19.1. Managing users in iTunes Connect
Figure 19.2. In App Purchase Test User
Figure 19.3. The form to add a new test user
Figure 19.4. Choosing Manage Your In App Purchases in iTunes Connect
Figure 19.5. Click the Create New button.
Figure 19.6. Setting up wallpaper product pricing in iTunes Connect
Figure 19.7. Creating a test product name and description in iTunes Connect
Figure 19.8. Your in-app purchase list in iTunes Connect
Figure 19.9. The wallpaper store interface as shown on the iPhone
Figure 19.10. Previewing the product in the wallpaper view
Figure 19.11. A purchase confirmation as shown on the iPhone
Figure 19.12. A successful purchase confirmation as shown on an iPhone
Chapter 20. Making money with iAd
Figure 20.1. A successful demonstration of a test iAd banner view inside the view controller
Figure 20.2. Full-screen view controller presented when the user taps the banner ad
Figure 20.6. Hide the banner view when there’s an error in the banner view.
Figure 20.7. Default banner view when an error occurs during advertisement downloading
Chapter 21. Introducing multitasking
Figure 21.1. Multitasking UI on the iPad and iPhone
Figure 21.2. Application’s lifecycle in iOS 4
Figure 21.3. Application moves from the foreground to the background.
Figure 21.4. The application restarts from the background and resumes in the foreground.
Chapter 22. Multitasking in depth
Figure 22.1. Significant location updates application running in the background
Figure 22.2. MySong’s view controller UI
Figure 22.3. The audio-playing application when it’s launched on the iPhone and iPad
Figure 22.5. The info.plist with the background audio key enabled
Figure 22.6. Remote-control UI of My-Song application on the multitasking dock
Appendix D. Updating current applications for the iPad
Figure D.1. Upgrading your build target for the iPad
Figure D.2. Collage application running on the iPad
Figure D.3. Set the target to collage-iPad 4.3 Simulator.
Figure D.4. Collage application running on the iPad
Figure D.5. Broken interface on the iPad