Foreword xviPreface xxChapter 1: Hello, iOS SDK 1 Installing Xcode 1About the iOS SDK 2What You Get for Free 3iOS Developer Program (Individual and Company) 4Developer Enterprise Program 4Developer University Program 5Registering 5iTunes U and Online Courses 5The iOS SDK Tools 6Testing Apps: The Simulator and Devices 7Simulator Limitations 8Tethering 10iOS Device Considerations 11Understanding Model Differences 15Screen Size 15Camera 16Audio 16Telephony 16Core Location and Core Motion Differences 17Vibration Support and Proximity 17Processor Speeds 17OpenGL ES 18iOS 18Summary 19 Chapter 2: Objective-C Boot Camp 21 Building Hello World the Template Way 21Creating the Hello World Project 21A Quick Tour of the Xcode Project Interface 25Adding the Hello World Label 28Objective-C Boot Camp 30The Objective-C Programming Language 31Classes and Objects 35The CarValet App: Implementing Car Class 41Implementing Car Methods 46Properties 50Creating and Printing Cars 53Properties: Two More Features 55Custom Getters and Setters 56Subclassing and Inheritance: A Challenge 58Inheritance and Subclassing 59Summary 62Challenges 63 Chapter 3: Introducing Storyboards 65 Storyboard Basics 65Scenes 66Scene 1: Creating the Add/View Scene 67Adding the Add/View Visual Elements 67Adding the Initial Add/View Behaviors 72Adding Car Display Behaviors 82Adding Previous and Next Car Buttons 86Scene 2: Adding an Editor 89Adding the Editor Visual Elements 91Adding Editor Behaviors 94Hooking It All Together 98Why Not Segue Back? 106Improving the Storyboard: Take 1 107Exchanging Data Using a Protocol 108Improving the Storyboard: Take 2 112Summary 115Challenges 116 Chapter 4: Auto Layout 117 Auto Layout Basics 117Constraints 120Perfecting Portrait 131Thinking in Constraints 132What Makes a Complete Specification 133Adding/Viewing Cars: Designing andImplementing the Constraints 134Edit Car: An Initial Look 155Adding Landscape 156Adding and Viewing Cars: Designing the Landscape Constraints 158Summary 180Challenges 181 Chapter 5: Localization 183 Localization Basics 183Redirection 184Formats 187Preparing the App for Localization 189Setting Up Localization for the Add/View Car Scene 191German Internationalization 203Adding the German Locale 203Changing the Device Language 206Updating the German Localizable.strings 207Changing Label Constraints 209Formatting and Reading Numbers 213Right-to-Left: Arabic Internationalization 215Adding Arabic Strings 215Making Dates and Numbers Work 219Text Alignment 222Summary 224Challenges 224 Chapter 6: Scrolling 225 Scrolling Basics 225Bounce Scrolling 227Adding a Scroll View to the View/Edit Scene 227Handling the Keyboard 230Adding the Scroll View 231Resizing for the Keyboard 234Adding Resizing 239Scrolling Through Content 240Populating the Scroll View 241Adding Paging 243Adding Zoom 245Rotation 248What Car Is This? 249Summary 250Challenges 251 Chapter 7: Navigation Controllers I: Hierarchies and Tabs 253 Navigation Controller 254Navigation Controller Classes 256Message-Based Navigation 263A Bit of Color 264Tab Bar Controller 267How the Tab Bar Works 268CarValet: Adding a Tab Bar 270Car Valet: Moving Info 272Summary 273Challenges 274 Chapter 8: Table Views I: The Basics 275 Introduction to Table Views 275Project TableTry 277Phase I: Replacing the Add/View Scene 283Adding a Car View Cell 285Adding New Cars 287Removing Cars 288Phase II: Adding an Edit Screen Hierarchy 291Adding a View Car Scene 292Populating the View Car Scene with Data 294Editing Data 296Editing the Year 307Summary 314Challenges 315 Chapter 9: Introducing Core Data 317 Introduction to Core Data 318Moving CarValet to Core Data 320Adding the CDCar Model 321Adding Core Data Boilerplate Code 324Converting CarTableViewController 326Easier Tables: NSFetchedResultsController 332Part 1: Integrating NSFetchedResultsController 333Part 2: Implementing NSFetchedResultsControllerDelegate 336Summary 339Challenges 340 Chapter 10: Table Views II: Advanced Topics 341 Custom Table View Cells 341Adding the Custom Cell Visual Elements 343Sections and Sorting 345Section Headers 346Enabling Changing of Section Groups 349Adding an Index 355Showing the Year in an Index 357Searching Tables 358Adding Searching 361Summary 369Challenges 370 Chapter 11: Navigation Controllers II: Split View and the iPad 371 Split View Controller 372Adding a Split View Controller 374Adding the Split View Controller 376Adding App Section Navigation 379Adding About 382Creating MainMenuViewController 383Polishing Menu Images 385Accessing the Menu in Portrait 387Implementing the DetailControllerSingleton 388Adding Car Images 397Adding Cars 400Adapting the Car Table to iPad 401Car Detail Controller 404Car Detail Controller, Take 2: iPad Specific 407Summary 424Challenges 425 Chapter 12: Touch Basics 427 Gesture Recognizer Basics 427Swiping Through Cars 428Moving Through Cars 429Calling nextOrPreviousCar: 432Adding Action Selectors 433Adding the Swipe Gestures 436Preventing Recognizers from Working 438Custom Recognizers 439Recognizer States 439Specializing Recognizer Messages 441iPad Go Home 442Creating the Return Gesture Recognizer 442Adding the Gesture Recognizer to the Current Detail 446Creating and Responding to the GestureRecognizer 446One More Gesture 448Drag Gesture Recognizer 448Adding the Taxi View with Drag 450Summary 450Challenges 451 Chapter 13: Introducing Blocks 453 Block Basics 453Declaring Blocks 453Using Blocks 454Writing Blocks 455Variable Scope 460Copying and Modification 461Replacing a Protocol 462Step 1: Changing ViewCarTableViewController 463Step 2: Updating CarTableViewController 464Step 3: Modifying CarDetailViewController 465Step 4: Updating MainMenuViewController 466Summary 466Challenges 467 Chapter 14: Instruments and Debugging 469 Instruments 469Templates and Instruments 471An Example Using the Time Profiler 472A Last Word on Instruments 478The Debugger 479Debug Gauges: Mini "Instruments" 481Breakpoints, and Actions, and Code.Oh My! 483Bug Hunt: Instruments and the Debugger 486Starting with Zombies 486Moving On to the Debugger 489Summary 491Challenges 491 Chapter 15: Deploying Applications 493 Certificates, Profiles, and Apps 493Generating a Development Certificate and Profile 495App ID and Provisioning 498Prelaunch 506Bug Reporting 506Metrics 508Quality Assurance Testing 509Marketing 512Uploading and Launching 513App Details 515Uploading to the App Store 521Some Things to Watch Postlaunch 526Where to Go Next 526Websites 527Developer Groups and Conferences 528Other Social Media 529Summary 530Challenges 530 Index 531.
Learning iOS Development : A Hands-On Guide to the Fundamentals of iOS Programming