**Summary** __Hello! iOS Development__ is a tutorial designed for novice iOS developers. Using the Hello! style of User Friendly cartoons and illustrations, this entertaining book will guide you step-by-step as you write your first apps for the iPhone and iPad and add them to the App Store. **About This Book** To create a successful iPhone or iPad app you need a great idea, serious commitment, and some programming know-how. If you supply the idea and the commitment, this entertaining and easy-to-read book will help you pick up the coding skills you need to bring your app to life. __Hello! iOS Development__ is a tutorial designed for new iOS developers. It builds on your existing programming knowledge to create apps for the iPhone and iPad using the Objective-C language and Apple's free Xcode tools. Characters from the User Friendly cartoon series guide you as you write your first apps and add them to the App Store. Written for readers with beginning-level programming skills. No prior experience with iOS development is assumed. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. **What's Inside** * No iPhone or iPad development experience required * Go from napkin sketch to finished app * Publish your apps in the App Store * Easy writing style with visual learning aids **About the Authors** **Lou Franco** is an iOS developer with over a decade of iOS experience. **Eitan Mendelowitz** teaches computing and the arts at Smith College. **Table of Contents** PART 1 HELLO! IPHONE 2. Hello! iPhone 3. Thinking like an iPhone developer 4. Coding in Objective-C PART 2 IPHONE APPLICATIONS: STEP BY STEP 6. Writing an app with multiple views 7. Polishing your app 8. Working with databases and table views 9. Creating a photo-based application 10. Moving, rotating, editing, and animating images 11. Working with location and maps 12. Accessing the internet PART 3 GOING FROM XCODE TO THE APP STORE 14. Debugging and optimizing your application 15. Building for the device and the App Store iOS Development......Page 1 Brief contents......Page 8 Contents......Page 10 Preface......Page 16 Acknowledgments......Page 17 How this book is organized......Page 19 What you'll need......Page 20 Author Online......Page 21 About the authors......Page 22 About Hello! books......Page 23 Part 1 Hello! iPhone......Page 24 1 Hello! iPhone......Page 26 Turning your Mac into an iPhone app factory......Page 28 Installing the iPhone SDK......Page 30 Using application templates......Page 32 Learning Xcode’s user interface......Page 35 Looking at Xcode’s menus......Page 36 Running Xcode’s iPhone simulator......Page 38 Introducing Interface Builder......Page 39 Making Hello, World!......Page 41 Editing, building, and running......Page 43 2 Thinking like an iPhone developer......Page 44 Using model-view-controller to dissect apps......Page 45 Thinking about apps as models, views, and controllers......Page 48 Test yourself on models, views, and controllers......Page 50 Designing apps with objects......Page 52 Establishing class relationships......Page 54 Organizing classes in headers and modules......Page 57 Avoiding crashes by understanding object lifetime......Page 58 Applying object-oriented design......Page 61 Preparing to code object-oriented designs......Page 63 3 Coding in Objective-C......Page 64 Creating classes to match your designs......Page 65 Declaring a message......Page 67 Declaring a view-controller message for your views to send......Page 71 Using properties to save data in objects......Page 72 Connecting code to views in Interface Builder......Page 74 Using the Connections Inspector in Interface Builder......Page 75 Creating outlets and actions using the assistant......Page 77 Defining the action message......Page 79 Part 2 iPhone applications: step by step......Page 82 4 Writing an app with multiple views......Page 84 Designing a flashcard application......Page 85 Creating classes to match your designs......Page 90 Declaring a view-controller message for your views to send......Page 92 Creating your other views and controllers......Page 94 Creating the model classes......Page 97 Implementing FCAnswerKey......Page 101 The FCGame class......Page 104 Connecting code to Interface Builder......Page 106 Connecting the FCCardViewController view......Page 108 Connecting the FCResultViewController view......Page 110 Orchestrating your app with controllers......Page 111 Handling card events in the FCCardViewController......Page 113 Showing the result in the FCResultViewController......Page 116 Reflecting on your progress......Page 119 5 Polishing your app......Page 120 Replacing the default application icon......Page 122 Making your application seem to load faster......Page 124 Using images for buttons......Page 126 Preparing a stretchable image......Page 127 Using a stretchable image for a button......Page 129 Adding animation......Page 132 Sliding views instead of instantly switching......Page 133 Flipping a view to show its back......Page 136 Using custom animations......Page 137 Making your apps look professional with graphic design......Page 140 6 Working with databases and table views......Page 142 Deciding what to store......Page 143 Sketching how the app will look......Page 144 Designing new models......Page 145 Creating a data model......Page 149 Adding entities and attributes......Page 150 Using relationships......Page 152 Generating data classes......Page 153 Adding Core Data support to your app......Page 154 Saving your game results......Page 159 Viewing in a table......Page 163 Navigating to related data......Page 172 Changing your data model......Page 175 Migrating between versions......Page 176 Planning for what’s next......Page 177 7 Creating a photo-based application......Page 178 Sketching Disguisey......Page 179 Defining the behavior of your application......Page 180 Designing your application’s models, views, and controllers......Page 182 Creating an app with tab-based navigation......Page 184 Renaming classes with the refactoring tool......Page 185 Storyboarding your app in Interface Builder......Page 186 Making images for the tabs......Page 190 Making the face view......Page 191 Making the disguise views......Page 193 Changing tabs with code......Page 194 Coding DIDisguise and DIDisguiseElement......Page 196 Getting images from the Photos application......Page 200 Adding disguise elements to the photo......Page 204 Wrapping it up, and what’s next......Page 209 8 Moving, rotating, editing, and animating images......Page 210 Sketching your new ideas......Page 211 Updating models for the new features......Page 213 Thinking about what you don’t know......Page 216 Visualizing the animation......Page 218 Coding the animation......Page 219 Picking the right gesture......Page 221 Attaching gesture recognizers......Page 222 Moving a disguise into place......Page 225 Pinching the DIDisguise to resize it......Page 229 Using a menu to remove parts of a disguise......Page 231 Displaying a Save menu......Page 235 Overlaying one image onto another......Page 237 Moving on from Disguisey......Page 239 9 Working with location and maps......Page 241 Looking at how it works......Page 242 Designing the models, views, and controllers......Page 243 Using the Utility Application template......Page 245 Adding the proper frameworks to your app......Page 246 Placing an MkMapView on the main view......Page 247 Showing the current location......Page 249 Adding a UIImageView......Page 252 Adding a camera button......Page 254 Getting a photo......Page 255 Showing the parking spot on the map......Page 257 Using the flipped view’s image......Page 258 Creating a map annotation model......Page 259 Showing the pin......Page 262 Making the data in Parkinator useful to others......Page 264 Overview of an internet-enabled Parkinator......Page 265 Tweeting an empty parking spot......Page 266 Using HTML for Help......Page 267 Creating a toolbar......Page 268 Adding buttons for send, search, and help......Page 269 Improving the toolbar layout......Page 270 Making the Help view......Page 271 Setting up the Help view......Page 272 Making an HTML resource......Page 275 Integrating with Twitter......Page 278 Looking at iOS support for Twitter......Page 279 Composing and sending a tweet......Page 280 Searching Twitter......Page 282 Parsing individual tweets......Page 284 Displaying locations in the Map View......Page 285 What’s next......Page 287 Part 3 Going from Xcode to the App Store......Page 288 11 Debugging and optimizing your application......Page 290 Intentionally introducing a bug......Page 291 Logging messages......Page 292 Using assertions......Page 294 Popping up dialogs......Page 296 Debugging with Xcode......Page 297 Stepping through code......Page 298 Watching variables......Page 299 Breaking when something happens......Page 300 Profiling your code......Page 301 Finding bottlenecks......Page 302 Optimizing memory usage......Page 305 What’s next......Page 307 Running your app on a device......Page 308 Getting developer certificates......Page 309 Provisioning your device......Page 312 Distributing to testers who don’t have Xcode......Page 316 Making sure everything is in order......Page 319 Creating your App Store application record......Page 321 Submitting your app to the App Store......Page 322 Congratulations!......Page 328 Design resources......Page 330 Simulating, deployment, and other tools......Page 331 B......Page 332 D......Page 333 G......Page 335 I......Page 336 N......Page 337 P......Page 338 S......Page 339 T......Page 340 Y......Page 341 iOS-back......Page 342 Annotation SummaryHello! iOS Development is a tutorial designed for novice iOS developers. Using the Hello! style of User Friendly cartoons and illustrations, this entertaining book will guide you step-by-step as you write your first apps for the iPhone and iPad and add them to the App Store. About This BookTo create a successful iPhone or iPad app you need a great idea, serious commitment, and some programming know-how. If you supply the idea and the commitment, this entertaining and easy-to-read book will help you pick up the coding skills you need to bring your app to life. Hello! iOS Development is a tutorial designed for new iOS developers. It builds on your existing programming knowledge to create apps for the iPhone and iPad using the Objective-C language and Apple's free Xcode tools. Characters from the User Friendly cartoon series guide you as you write your first apps and add them to the App Store. Written for readers with beginning-level programming skills. No prior experience with iOS development is assumed. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. What's InsideNo iPhone or iPad development experience requiredGo from napkin sketch to finished appPublish your apps in the App StoreEasy writing style with visual learning aidsAbout the AuthorsLou Franco is an iOS developer with over a decade of iOS experience. Eitan Mendelowitz teaches computing and the arts at Smith College. Table of ContentsPART 1 HELLO! IPHONE Hello! iPhone Thinking like an iPhone developerCoding in Objective-CPART 2 IPHONE APPLICATIONS: STEP BY STEPWriting an app with multiple viewsPolishing your appWorking with databases and table views Creating a photo-based applicationMoving, rotating, editing, and animating imagesWorking with location and maps Accessing the internetPART 3 GOING FROM XCODE TO THE APP STOREDebugging and optimizing your application Building for the device and the App Store