iOS App Development For Dummies

Book description

If you've got incredible iOS ideas, get this book and bring them to life!

iOS 7 represents the most significant update to Apple's mobile operating system since the first iPhone was released, and even the most seasoned app developers are looking for information on how to take advantage of the latest iOS 7 features in their app designs. That's where iOS App Development For Dummies comes in! Whether you're a programming hobbyist wanting to build an app for fun or a professional developer looking to expand into the iOS market, this book will walk you through the fundamentals of building a universal app that stands out in the iOS crowd.

  • Walks you through joining Apple's developer program, downloading the latest SDK, and working with Apple's developer tools

  • Explains the key differences between iPad and iPhone apps and how to use each device's features to your advantage

  • Shows you how to design your app with the end user in mind and create a fantastic user experience

  • Covers using nib files, views, view controllers, interface objects, gesture recognizers, and much more

  • There's no time like now to tap into the power of iOS - start building the next big app today with help from iOS App Development For Dummies!

    Table of contents

      1. Introduction
        1. A Bit of History
          1. The iPhone stands alone
          2. Enter the App Store
          3. The iPad joins the party
        2. The Plan for This Book
        3. iOS and Xcode Game Changers
        4. About This Book
        5. Conventions Used in This Book
        6. Icons Used in This Book
        7. Foolish Assumptions
        8. How This Book Is Organized
          1. Part I: Getting Started
          2. Part II: Building RoadTrip
          3. Part III: Getting Your Feet Wet: Basic Functionality
          4. Part IV: The Model and the App Structure
          5. Part V: Adding the App Content
          6. Part VI: The Part of Tens
        9. Beyond the Book
        10. Where to Go from Here
      2. Part I: Getting Started
        1. Chapter 1: What Makes a Great iOS App
          1. Figuring Out What Makes a Great iOS App
            1. Making your app work well
            2. Handling networking, social media, and location
            3. Designing a powerful and intuitive interface that disappears
          2. Using the iOS Platform to the Fullest
            1. Exploiting advantages of the system
            2. Accessing the Internet
            3. Knowing the location of the user
            4. Tracking orientation and motion
            5. Tracking users’ fingers on the screen
            6. Playing content
            7. Accessing information from Apple’s apps
            8. Copying, cutting, and pasting between apps
            9. Multitasking, background processing, and notifications
            10. Living large on the big screen
          3. Embracing Device Limitations
            1. Designing for fingers
            2. Balancing memory and battery life
          4. Why Develop iOS Apps?
          5. Developing with Apple’s Expectations in Mind
          6. Thinking About You, Apps, and Money
          7. Enter the Cloud
          8. Developing an App the Right Way Using the Example App in This Book
          9. What’s Next
        2. Chapter 2: Getting to Know the SDK
          1. Developing Using the SDK
          2. Using Xcode to Develop an App
            1. Creating an Xcode project
            2. Developing the app
          3. The Workspace Window
            1. Workspace areas
            2. Displaying an area’s content
            3. The toolbar and Tab bar
            4. The Organizer window
        3. Chapter 3: The Nuts and Bolts of an Xcode Project
          1. Creating Your Project
          2. Exploring Your Project
            1. The project
            2. The Project editor
            3. The Project navigator
          3. Setting Your Xcode Preferences
          4. Building and Running Your Application
            1. Building an app
            2. The iPad’s Split views
            3. The Log navigator
          5. Running in the Simulator
            1. Interacting with your simulated hardware
            2. Making gestures
            3. Uninstalling apps and resetting your device
            4. Living with the Simulator’s limitations
          6. Using Asset Catalogs
          7. Adding the Image and Sound Resources and an App Icon
      3. Part II: Building RoadTrip
        1. Chapter 4: Storyboards and the User Experience
          1. Introducing the Storyboard
            1. Telling your story
            2. Working with object graphs
          2. Defining What You Want an App to Do: The RoadTrip App
          3. Creating the Application Architecture
          4. What You Add Where
          5. Using Frameworks
          6. Using Design Patterns
            1. The iOS design patterns
            2. The Model-View-Controller (MVC) design pattern
          7. Working with Windows and Views
            1. Looking out the window
            2. Admiring the view
            3. The kinds of views you use
          8. View Controllers — the Main Storyboard Players
          9. What About the Model?
          10. It’s Not That Neat
          11. Taking a Look at Other Frameworks
            1. The Foundation framework
            2. The CoreGraphics framework
            3. Even more frameworks
          12. Understanding the MVC in the Project
        2. Chapter 5: Creating the RoadTrip User Interface
          1. Creating Your User Interface in the iPad Storyboard
            1. It’s about the view controller
            2. Using Interface Builder to add the user elements
          2. Working within the Utility Area
            1. Inspector and Quick Help pane
            2. Library pane
          3. Understanding iPad Navigation
          4. Adding a New View Controller
            1. Danger Will Robinson
            2. Adding an identifier to the view controller
          5. View Layout
          6. Adding the User Interface Objects
            1. Autosizing with Auto Layout
            2. Adding the Test Drive button
          7. Massaging the Template Code
          8. Getting Rid of Warnings
          9. Creating the iPhone User Interface
        3. Chapter 6: The Runtime, Managing Memory, and Using Properties
          1. Stepping Through the App Life Cycle
            1. UIApplicationMain
            2. Handling events while your application is executing
            3. Knowing what to do when the normal processing of your application is interrupted
            4. An overview of the view controller life cycle
          2. Working within the Managed Memory Model Design Pattern
            1. Understanding memory management
            2. Using reference counting
          3. Automatic Reference Counting (ARC)
            1. Working with variable types according to ARC
            2. Understanding the deadly retain cycle
          4. Observing Low-Memory Warnings
            1. The didReceiveMemoryWarning method
            2. The applicationDidReceive MemoryWarning: method
            3. The UIApplicationDidReceiveMemory WarningNotification: notification
            4. Picking the right memory-management strategy for your application
          5. Customizing the Behavior of Framework Classes
            1. Subclassing
            2. The Delegation pattern
          6. Understanding Declared Properties
            1. What comprises a declared property
            2. Using dot syntax
            3. Setting attributes for a declared property
            4. Writing your own accessors
            5. Accessing instance variables with accessors
          7. Hiding Instance Variables
        4. Chapter 7: Working with the Source Editor
          1. Navigating in the Xcode Source Editors
            1. Using the Jump bar
            2. Organizing your code using the #pragma mark statement
          2. Using the Xcode Source Editor
            1. Using Live Issues and Fix-it
            2. Compiler warnings
            3. The Issue navigator
          3. Accessing Documentation
            1. Getting Xcode help
            2. The Organizer window
            3. The Help menu
          4. Finding and Searching in Your Project
            1. Using the Find command to locate an item in a file
            2. Using the Search navigator to search your project or framework
            3. Using the Symbol navigator
          5. You’re Finally Ready to Write Code!
      4. Part III: Getting Your Feet Wet: Basic Functionality
        1. Chapter 8: It’s (Finally) Time to Code
          1. Checking for Network Availability
            1. Downloading the Reachability sample
            2. Adding the code to check for reachability
          2. Exploring the Changes in iOS 7
            1. The dated interface
            2. Losing the content
          3. Setting the Master View Controller Title
          4. Understanding Autorotation
          5. Writing Bug-Free Code
            1. Working in the Debug area and Debug navigator
            2. Managing breakpoints
            3. What you’ll find in the Debug area
            4. What you’ll find in the Debug navigator
            5. Displaying variables in the Source editor
            6. Tiptoeing through your program
        2. Chapter 9: Adding Outlets and Actions to Your RoadTrip Code
          1. Using Custom View Controllers
            1. Adding the custom view controller
            2. Setting up the TestDriveController in the MainStoryboard for iPad
          2. Understanding Outlets
          3. Adding Outlets
            1. Opening the Assistant editor
            2. Creating the outlet
            3. The Connections inspector
          4. Working with the Target-Action Design Pattern
            1. Using the Target-Action pattern: It’s about controls
            2. Adding an action
          5. How Outlets and Actions Work
            1. Update the iPhone storyboard file
        3. Chapter 10: Adding Animation and Sound to Your App
          1. Understanding iOS Animation
            1. View geometry and coordinate systems
            2. Points versus pixels
            3. A view’s size and position
            4. Working with data structures
          2. Coordinating Auto Layout, Frames, and Constraints
          3. Animating a View
          4. Finally, More Code
          5. Implementing the testDrive Method
          6. Understanding Block Objects
          7. Rotating the Object
          8. Working with Audio
          9. Tracking Touches
          10. Animating a Series of Images “In Place”
          11. iPhone versus iPad
      5. Part IV: The Model and the App Structure
        1. Chapter 11: The Trip Model
          1. What the Model Contains
          2. Adding the Model Data
            1. Using property lists
            2. Adding a property list to your project
          3. Adding the First Two Model Classes
          4. Understanding the Trip Interface
          5. Implementing the Trip Class
            1. Initializing objects
            2. Invoking the superclass’s init method
            3. Initializing instance variables
            4. Returning self
          6. Initializing the Destination Class
          7. Creating the Trip Object
          8. More Debugger Stuff
        2. Chapter 12: Implementing the Master View Controller
          1. Setting Up a Custom View Controller for the iPad
          2. Adding a Background Image and Title
          3. Updating the iPhone Storyboard File
        3. Chapter 13: Working with Split View Controllers and the Master View
          1. The Problem with Using a Navigation Controller in Detail View
          2. Using a Navigation Controller in the Master View
          3. Adding a Gesture Recognizer
          4. The Split View Controller
            1. The UISplitViewController delegate
            2. Localization
            3. Back to the main feature
          5. Adding the Toolbar
            1. Adding the button when the view controller is replaced
          6. A Few More Tweaks to the MasterViewController
          7. And (a Little Extra) One More Thing
          8. Don’t Forget the iPhone
        4. Chapter 14: Finishing the Basic App Structure
          1. Extending the iPad Storyboard to Add More Functionality to Your App
            1. Adding the Weather view controller
            2. Adding the Events controller
            3. Adding the remaining controllers
          2. Changing the Split View Controller to a Detail View Controller Relationship
          3. Repeat for iPhone
      6. Part V: Adding the App Content
        1. Chapter 15: How’s the Weather? Working with Web Views
          1. The Plan
            1. The iPad storyboard
            2. The iPhone storyboard
          2. Setting Up the Weather Controller
            1. Adding the custom view controller
            2. Setting Up WeatherController in the Main_iPad.storyboard file
          3. The Weather Controller
            1. Managing links in a Web view
          4. More Opportunities to Use the Debugger
            1. Unrecognized selector sent to instance
          5. Repeat for the iPhone Storyboard
            1. Adding the WeatherController to the iPhone storyboard file
            2. Test in the iPhone Simulator
        2. Chapter 16: Displaying Events Using a Page View Controller
          1. The Plan
          2. Setting Up the EventsController
            1. Adding the custom view controller
            2. Setting up the EventsController in the MainStoryboard
            3. Adding and setting up the EventPageController in the MainStoryboard
          3. Extending the Trip Model
          4. Adding the Events Class
          5. The EventsController and Its PageViewController
            1. Data sources and delegates
            2. Data source
            3. Delegate
            4. The EventsController
            5. The EventPageController
          6. Adding Events Support to the iPhone Storyboard
        3. Chapter 17: Finding Your Way
          1. The Plan
          2. Setting Up the Map Controller
            1. Adding the custom view controller
            2. Setting up the MapController in the Main_iPad.Storyboard
            3. Test
          3. Putting MapKit through Its Paces
            1. MKMapView
            2. Enhancing the map
          4. Changing the Map Type
          5. Adding Annotations
            1. Creating the annotation
            2. Displaying the map title and annotations
          6. Going to the Current Location
          7. Fixing the Status Bar
          8. Update the iPhone Storyboard
        4. Chapter 18: Geocoding
          1. Understanding Geocoding on the iPad
          2. Reverse Geocoding
        5. Chapter 19: Finding a Location
          1. Setting Up the Find Controller
            1. Adding the custom view controller
            2. Setting up FindControllerin the Main_iPad File
          2. Implementing the Find Controller
            1. Adding the Map View
            2. Getting the text
            3. Disabling cell highlighting
          3. Finding the Location
          4. Making the Map Title the Found Location
          5. Adding the FindController to the iPhone Storyboard
        6. Chapter 20: Selecting a Destination
          1. The Plan
          2. Setting Up the DestinationController for the iPad Storyboard
            1. Adding the custom view controller
            2. Setting up the DestinationController in the Main_iPad.storyboard
          3. Adding a Modal View
          4. Implementing a Table View
          5. Creating the Table View
            1. Adding sections
            2. Displaying the cell
            3. Working with user selections
          6. Saving the Destination Choice and Selecting a Destination
            1. Displaying the Destination table
            2. Testing
          7. Adding Destination Support to the iPhone Storyboard
          8. A Word about Adding Settings
          9. What’s Next?
      7. Part VI: The Part of Tens
        1. Chapter 21: Ten Ways to Be Successful with Apps
          1. Make a Million Dollars in a Week
          2. Build a Portfolio
          3. Build App Icons
          4. Design User Interfaces
          5. Build Back Ends
          6. Socialize with Apps
          7. Talk About Apps with People Who Want Them
          8. Promote Apps
          9. Provide Support to Users
          10. Fix Bugs
        2. Chapter 22: Ten Ways to Be a Happy Developer
          1. Keep Things Loosely Coupled
          2. Remember Memory
          3. Don’t Reinvent the Wheel
          4. Understand State Transitions
          5. Do the Right Thing at the Right Time
          6. Avoid Mistakes in Error Handling
          7. Use Storyboards
          8. Remember the User
          9. Keep in Mind That the Software Isn’t Finished Until the Last User Is Dead
          10. Keep It Fun
      8. About the Author
      9. Cheat Sheet
      10. More Dummies Products

    Product information

    • Title: iOS App Development For Dummies
    • Author(s):
    • Release date: April 2014
    • Publisher(s): For Dummies
    • ISBN: 9781118871058