CONTENTS

INTRODUCTION

CHAPTER 1: GETTING STARTED WITH IOS 5 PROGRAMMING

Obtaining the Tools and SDK

Components of Xcode

Xcode

iOS Simulator

Interface Builder

Instruments

Architecture of the iOS

Some Useful Information before You Get Started

Versions of iOS

Testing on Real Devices

Screen Resolutions

Summary

CHAPTER 2: WRITING YOUR FIRST HELLO WORLD! APPLICATION

Getting Started with Xcode

Using Interface Builder

Writing Some Code

Customizing Your Application Icon

Displaying Launch Images

Summary

CHAPTER 3: UNDERSTANDING VIEWS, OUTLETS, AND ACTIONS

Outlets and Actions

Using Views

Using the Alert View

Using the Action Sheet

Page Control and Image View

Using the Web View

Adding Views Dynamically Using Code

Understanding View Hierarchy

Summary

CHAPTER 4: EXPLORING THE DIFFERENT VIEW CONTROLLERS

The Single View Application Template

Application Delegate

Controlling Your UI Using View Controllers

The Empty Application Template

Adding a View Controller and Views Programmatically

Animating the Switching of Views

The Master-Detail Application Template

Displaying Some Items in the Master-Detail Application

The Tabbed Application Template

Summary

CHAPTER 5: ENABLING MULTI-PLATFORM SUPPORT FOR THE IPHONE AND IPAD

Technique 1 – Modifying the Device Target Setting

Detecting the Platform Programmatically

Technique 2 – Creating Universal Applications

Choosing a Porting Technique

Summary

CHAPTER 6: HANDLING KEYBOARD INPUTS

Using the Keyboard

Customizing the Type of Inputs

Dismissing the Keyboard

Automatically Displaying the Keyboard When the View Window Is Loaded

Detecting the Presence of the Keyboard

Using the Scroll View

Scrolling Views When the Keyboard Appears

Summary

CHAPTER 7: SUPPORTING SCREEN ROTATIONS

Responding to Device Rotations

Rotating to a Different Screen Orientation

Handling Rotations

Programmatically Rotating the Screen

Rotating during Runtime

Fixing the View Window to a Specific Orientation

Summary

CHAPTER 8: CREATING AND PERSISTING DATA USING THE TABLE VIEW

Creating a Simple Table View

Adding a Header and Footer

Adding an Image

Displaying the Item Selected

Indenting

Modifying the Height of Each Row

Using the Table View in a Master-Detail Application

Displaying Sections

Adding Indexing

Adding Search Capability

Disclosures and Checkmarks

Navigating to Another View

Summary

CHAPTER 9: USING APPLICATION PREFERENCES

Creating Application Preferences

Programmatically Accessing the Settings Values

Loading the Settings Values

Resetting the Preferences Settings Values

Saving the Settings Values

Summary

CHAPTER 10: FILE HANDLING

Understanding the Application Folders

Using the Documents and Library Folders

Storing Files in the Temporary Folder

Which Folder Should You Use: Documents or tmp?

Using Property Lists

Copying Bundled Resources

Importing and Exporting Files

Exporting Documents

File Sharing

Importing Documents

Importing Self-Defined Documents

Summary

CHAPTER 11: DATABASE STORAGE USING SQLITE

Linking to the SQLite3 Library

Creating and Opening a Database

Examining the Database Created

Creating a Table

Inserting Records

Bind Variables

Retrieving Records

Bundling SQLite Databases with Your Application

Summary

CHAPTER 12: PROGRAMMING ICLOUD

Storing and Using Documents in iCloud

Enabling iCloud Storage for Your Application

Setting Project Entitlements

Managing iCloud Documents Using the UIDocument Class

Storing Documents on iCloud

Storing Key-Value Data in iCloud

Summary

CHAPTER 13: PERFORMING SIMPLE ANIMATIONS AND VIDEO PLAYBACK

Using the NSTimer Class

Animating the Visual Change

Transforming Views

Translation

Rotation

Scaling

Animating a Series of Images

Playing Video on the iPhone

Summary

CHAPTER 14: ACCESSING BUILT-IN APPLICATIONS

Sending E-Mail

Invoking Safari

Invoking the Phone

Invoking SMS

Accessing the Camera and the Photo Library

Accessing the Photo Library

Accessing the Camera

Summary

CHAPTER 15: ACCESSING THE SENSORS

Using the Gyroscope and Accelerometer

Visualizing the Sensor Data

Using the Shake API to Detect Shakes

Summary

CHAPTER 16: USING WEB SERVICES

Basics of Consuming XML Web Services

Using SOAP 1.1

Using SOAP 1.2

Using HTTP POST

Consuming a Web Service in Your iOS Application Using SOAP

Parsing the XML Response

Consuming JSON Web Services

Integrating Twitter into Your Application

Summary

CHAPTER 17: BLUETOOTH PROGRAMMING

Using the Game Kit Framework

Searching for Peer Devices

Sending and Receiving Data

Implementing Voice Chatting

Summary

CHAPTER 18: BONJOUR PROGRAMMING

Creating the Application

Publishing a Service

Browsing for Services

Summary

CHAPTER 19: PROGRAMMING REMOTE NOTIFICATIONS USING APPLE PUSH NOTIFICATION SERVICES

Using Apple Push Notification Service

Generating a Certificate Request

Generating a Development Certificate

Creating an Application ID

Configuring an App ID for Push Notifications

Creating a Provisioning Profile

Provisioning a Device

Creating the iOS Application

Creating the Push Notification Provider

Summary

CHAPTER 20: DISPLAYING MAPS

Displaying Maps and Monitoring Changes Using the Map Kit

Getting Location Data

Specifying the Hardware Requirement for Location Tracking

Displaying Location Using a Map

Getting Directional Information

Rotating the Map

Displaying Annotations

Reverse Geocoding

Displaying a Disclosure Button

Summary

CHAPTER 21: PROGRAMMING BACKGROUND APPLICATIONS

Understanding Background Execution on the iOS

Examining the Different Application States

Opting Out of Background Mode

Detecting Multitasking Support

Tracking Locations in the Background

Making Your Location Apps More Energy Efficient

Local Notification

Notifying Other Objects Using the NSNotification Class

Summary

APPENDIX A: TESTING ON AN ACTUAL DEVICE

APPENDIX B: GETTING AROUND IN XCODE

APPENDIX C: CRASH COURSE IN OBJECTIVE-C

APPENDIX D: ANSWERS TO EXERCISES

INDEX

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.242.71