Skip to main content

Beginning iPad Application Development

Beginning iPad Application Development

Wei-Meng Lee

ISBN: 978-0-470-64165-1

May 2010

600 pages

Select type: Paperback

Product not available for purchase


Beginning iPad Application Development will help jumpstart your iPad development. It covers topics progressively so you learn without being overwhelmed by details. It adopts the philosophy that the best way to learn is by doing, hence the numerous Try It Out sections, which first show you how to build something and then explain how things work. To truly benefit from this book, you should have some background in programming and at least be familiar with object-oriented programming concepts. Coverage includes:

  • getting started with Xcode and Interface Builder to build a Hello World application
  • fundamental concepts of iPad programming: outlets and actions
  • UI widgets known as views that make up the iPad application user interface
  • view controllers available in the iPhone SDK and different types of iPad applications - View-based, Window-based, Split View-based, and Tab Bar applications
  • how to deal with the iPad’s virtual keyboard, hide the keyboard on demand, and ensure views are not blocked by the keyboard when it is displayed
  • reorient the application's UI when the device is rotated or force an application to display in a certain orientation
  • using the Table view is to display rows of data and implementing search capabilities in Table view
  • using application settings to persist application preferences
  • persisting application data by saving the data to files in the application's sandbox directory
  • using the embedded SQLite3 database library to store data
  • implementing animations
  • using gesture recognizers in the iPhone SDK to interpret user's input gestures
  • access the iPad accelerometer and detecting device shakes
  • communicating with Web services and their data
  • publishing services on the network using Bonjour
  • implementing applications that use push notifications
  • building location-based services applications, obtaining geographical locations data, displaying a map
  • an overview of the Objective-C language 

Introduction xxv

Part I: Getting started

Chapter 1: Getting Started with iPad Programming 3

Obtaining the iPhone SDK 4

Components of the iPhone SDK 6

Architecture of the iPhone OS 14

Some Useful Information Before You Get Started 17

Summary 20

Chapter 2: Write Your First Hello World! Application 23

Getting Started with Xcode 23

Customizing Your Application Icon 38

Summary 42

Chapter 3: Views, Outlets, and Actions 45

Outlets and Actions 45

Using Views 52

Adding Views Dynamically Using Code 68

Understanding View Hierarchy 71

Summary 73

Chapter 4: View Controllers 77

The View-based Application Template 78

The Window-based Application Template 89

The Split View-based Application Template 108

The Tab Bar Application Template 129

Summary 138

Chapter 5: Keyboard Inputs 141

Using the Keyboard 142

Customizing the Type of Inputs 144

Detecting the Presence of the Keyboard 153

Summary 165

Chapter 6: Screen Rotations 167

Responding to Device Rotations 167

Programmatically Rotating the Screen 179

Summary 180

Chapter 7: Using the Table View 185

A Simple Table View 186

Summary 230

Chapter 8: Application Preferences 233

Creating Application Preferences 233

Programmatically Accessing the Settings Values 242

Summary 251

Chapter 9: File Handling 253

Understanding the Application Folders 254

Using Property Lists 259

Copying Bundled Resources 265

Summary 267

Chapter 10: Database Storage Using SQLite3 269

Using SQLite3 270

Creating and Opening a Database 272

Bundling SQLite Databases with Your Application 281

Summary 282

Part III : Advanced iPad Programming Techniques

Chapter 11: Simple Animations 287

Using the NSTimer Class 287

Transforming Views 295

Animating a Series of Images 300

Summary 303

Chapter 12: Recognizing Gestures 305

Recognizing Gestures 305

Detecting Touches 328

Summary 346

Chapter 13: Accessing the Accelerometer 349

Using the Accelerometer 349

Using Shake API to Detect Shakes 354

Summary 361

Part IV: Network programming techniques

Chapter 14: Web Services 365

Basics of Consuming XML Web Services 366

Consuming a Web Service in Your iPad Application 370

Parsing the XML Response 378

Summary 383

Chapter 15: Bluetooth Programming 385

Using the Game Kit Framework 385

Implementing Voice Chatting 395

Summary 402

Chapter 16: Bonjour Programming 405

Creating the Application 405

Publishing a Service 408

Browsing for Services 410

Summary 416

Chapter 17: Apple Push Notification Services 419

Generating a Certificate Request 420

Generating a Development Certificate 422

Creating an App ID 425

Creating the iPad Application 432

Creating the Push Notification Provider 436

Summary 439

Chapter 18: Displaying Maps 441

Displaying Maps and Monitoring Changes using the Map Kit 441

Getting Location Data 447

Displaying Disclosure Button 476

Summary 479

Appendix A: Answers to Exercises 483

Appendix B: Getting Around in Xc ode 495

Launching Xcode 495

Debugging Your Applications 501

Appendix C: Getting Around in Interface Builder 507

.xib Window 507

Designing the View 508

Inspector Window 510

Library 512

Outlets and Actions 512

Appendix D: Crash Course in Objective-C 519

Directives 519

Classes 520

Memory Management 532

Protocols 539

Index 545

Chapter 18: Displaying Maps Download
Chapter 2: Write Your First Hello World! Application Download
Chapter 12: Recognizing Gestures Download
Chapter 13: Accessing the Accelerometer Download
Chapter 17: Apple Push Notification Services Download
Chapter 16: Bonjour Programming Download
Chapter 6: Screen Rotations Download
Chapter 5: Keyboard Inputs Download
Beginning iPad Application Development Code Download Download
Chapter 15: Bluetooth Programming Download
Chapter 10: Database Storage Using SQLite3 Download
ReadMe File Download
Chapter 3: Views, Outlets, and Actions Download
Chapter 9: File Handling Download
Chapter 8: Application Preferences Download
Chapter 4: View Controllers Download
Chapter 11: Simple Animations Download
Chapter 14: Web Services Download
Chapter 7: Using the Table View Download