Contents
preface
acknowledgments
about this book
about the cover illustration
Part 1 Getting started
- Chapter 1 Getting started with iOS development
- The iOS development environment
- Using Xcode
- A quick Hello World app
- Summary
 
- Chapter 2 Creating an iOS application
- Source code files
- Adding a button to your app
- Connecting your button to an action
- Connecting your label as an outlet
- Implementing your button action
- Delegation
- Summary
Part 2 Putting iOS into practice
- Chapter 3 Using view controllers and images in PicDecor
- UI design concepts
- Creating view controllers and other widgets
- Technique 1 Designing a view controller with IB
- Technique 2 Adding an ImageView and toolbar to a view
- Technique 3 Adding buttons to a view
- Developing actions and outlets
- Technique 4 Declaring actions and outlets in Xcode
- Technique 5 Connecting actions and outlets to code
- Using the camera/photo album
- Technique 6 Adding camera/photo album access
- Technique 7 Presenting a view controller modally
- Technique 8 Dismissing a modally displayed view controller
- Displaying and handling images
- Technique 9 Displaying selected images
- Technique 10 Detecting a device without a camera
- Providing email capabilities
- Technique 11 Adding in-app email
- Technique 12 Scaling an image for email
- Technique 13 Using the activity indicator
- Summary
 
- Chapter 4 Accessing the address book/contacts in Dial4
- Creating a master-detail application with a table view
- Technique 14 Creating a master-detail application
- Presenting data using a table view
- Technique 15 Displaying data in a table view
- Technique 16 Handling table view cell selection
- Accessing the address book
- Technique 17 Retrieving the address book entries
- Technique 18 Obtaining address book image property
- Technique 19 Obtaining grouped properties from the address book
- Technique 20 Making a call
- Technique 21 Displaying address book record details
- Managing table data
- Technique 22 Deleting and rearranging table view rows
- Technique 23 Filtering displayed table view data
- Summary
 
- Chapter 5 MapKit and the camera in WhereIsMyCar
- Using maps with the user’s location
- Technique 24 Adding a MapView to a project
- Technique 25 Centering and zooming a MapView
- Technique 26 Finding the user’s location via CoreLocation
- Displaying details on MapView locations and storing user’s notes
- Technique 27 Displaying MapView pins
- Technique 28 Storing and retrieving the user’s location
- Technique 29 Reverse geocoding
- Technique 30 Adding pin callouts
- Technique 31 Typing and storing user’s note
- Storing, retrieving, and displaying camera images
- Technique 32 Adding a camera control
- Technique 33 Receiving and storing the picture
- Technique 34 Displaying a picture
- Summary
 
- Chapter 6 Settings, audio, and shake detection in TimeDown
- Settings bundle in iOS projects
- Technique 35 Adding settings to an Xcode project
- Technique 36 Initializing iOS settings
- Technique 37 Accessing settings values in an app
- Technique 38 Setting the app settings icon
- Runtime and time-based UI changes
- Technique 39 Rounding corners of a view
- Technique 40 Updating the UI with a repeating timer
- Playing audio and vibrating the device
- Technique 41 Playing an MP3 file
- Technique 42 Vibrating the iPhone
- Detecting and handling device motion
- Technique 43 Detecting shaking with the accelerometer
- Technique 44 Handling shaking with an action sheet
- Summary
 
- Chapter 7 CoreData, iPod access, and playing music—PlayMyLists
- Creating a table view project
- Technique 45 Create a project with table navigation
- Technique 46 Defining entities in CoreData
- Technique 47 Creating relationships in CoreData
- Technique 48 Inserting and deleting CoreData objects
- Technique 49 Creating classes for CoreData entities
- Displaying CoreData for data-driven apps
- Technique 50 Display selected item details
- Technique 51 Passing a Playlist to the Detail View controller
- Technique 52 Replacing the detail view controller
- Technique 53 Managing tracks in the selected playlist
- Accessing iPod music
- Technique 54 Using the media picker to access music
- Technique 55 Finding media info from the iPod
- Playing music with iOS
- Technique 56 Playing the playlist
- Technique 57 Handling music player updates
- Summary
 
- Chapter 8 Push notification and in-app purchase—Rock, Paper, Scissors
- Using Apple Push Notification
- Technique 58 Provisioning for push notification
- Technique 59 Configuring UrbanAirship for APN
- Technique 60 Registering your app for push notifications
- Technique 61 Registering your app with UrbanAirship
- Technique 62 Sending a batch push notification
- In-app purchase
- Technique 63 Setting up iTunesConnect for in-app purchase
- Technique 64 Creating an in-app test account
- Technique 65 Adding in-app purchases to the project
- The Rock, Paper, Scissors game
- Technique 66 Designing the game
- Technique 67 Overturning a loss
- Summary
 
- Chapter 9 GameCenter leaderboards and achievements—Rock, Paper, Scissors
- Game Center authentication and leaderboards
- Technique 68 Authenticating the player
- Technique 69 Configuring leaderboards in iTunesConnect
- Technique 70 Saving the player’s score
- Technique 71 Displaying the leaderboard
- GameCenter achievements
- Technique 72 Adding an achievement in iTunesConnect
- Technique 73 Reporting achievement progress
- Technique 74 Displaying achievement boards
- Matching and playing via GameCenter
- Technique 75 Matching players
- Technique 76 Inviting friends to play
- Technique 77 Voice chat via the GameCenter
- Summary
 
- Chapter 10 iTunes API, iPad, and iAd—MusicSearch
- Searching for music with the iTunes API
- Technique 78 Querying with the iTunes API
- Technique 79 Displaying JSON results
- Technique 80 Playing song preview
- Converting an app to iPad
- Technique 81 Converting the project in Xcode
- Technique 82 Adding a split view to the app
- Technique 83 Displaying items in the detail view
- Adding iAds to an app
- Technique 84 Configuring iTunes for iAds
- Technique 85 Adding iAds to an app
- Summary
 
- Chapter 11 Collection view, social, reminders, and state restoration—MeetSocial
- Presenting data using a collection view
- Technique 86 Creating a project to use a collection view
- Technique 87 Fetching search results from Meetup.com
- Technique 88 Displaying items in a collection view
- Sharing via the Social Framework
- Technique 89 Specifying activity items
- Technique 90 Presenting the activity sharing interface
- Creating calendar items in the OS
- Technique 91 Creating the event store and calendar event
- Technique 92 Creating a calendar reminder
- Saving and restoring the UI state
- Technique 93 Specify that an app will save/restore
- Technique 94 Setting restoration IDs on objects
- Technique 95 Assigning restoration classes
- Technique 96 Encode/decode UI-related state values
- Technique 97 Table/collection datasource considerations
- Technique 98 Additional app version and state data
- Summary
 
appendix The iOS developer program and app distribution
index