Product Description
Written by the trainers at the Big Nerd Ranch, the worldwide leader in professional training for Mac developers, this book provides a hands-on guide to learning how to program for the iPhone and iPod touch. Coverage includes
An overview of Objective-C, the core language you’ll use to program for the iPhone. An overview of the Xcode Tools, How to work with the iPhone SDK’s UIKit framework and Cocoa TouchBuild apps that use MapKit and CoreLocation, as well as… More >>
iPhone Programming: The Big Nerd Ranch Guide
Aaron Hillegas and Linda Leung discuss the Apple phenomena, what we can expect next from Steve Jobs & co., Big Nerd Ranch’s monastic retreat, and Aaron’s thoughts on Android.
If you frequent Apple developer conferences, you’ll have probably seen Aaron Hillegass. He’s the guy who wears the ten-gallon cowboy so he can be recognizable and approachable. Hillegass is a trainer and writer — he wrote the best seller Cocoa Programming for Mac OS X, now in its third-edition, and most recently iPhone Programming, the first of a series of Guides from The Big Nerd Ranch.
A former developer trainer at NeXT, Hillegass founded Big Nerd Ranch in 2001, applying the monastic idea of retreat to technical training. Since then, BNR has hosted more than 2,000 students at its ranch in Atlanta, Ga. In keeping with its monastic theme, it also provides training at a monastery in Germany.
iPhone Programming: The Big Nerd Ranch Guide -Â Table of Contents
Introduction
- Prerequisites
- Typographical Conventions
- Hardware and Software
- How to Use This Book
- Learning is not Fun
Chapter 1: Simple iPhone Application
- Creating an Xcode Project
- Using Interface Builder
- Model-View-Controller
- Declarations
- Declaring instance variables
- Declaring methods
- Making Connections
- Setting pointers
- Setting targets and actions
- Summary
- Implementing Methods
- Event-driven Programming
- Deploying an Application
- Application Icons
- Default Images
Chapter 2: Objective-C
- Objects
- Instances
- Creating an instance
- Sending messages
- Destroying an instance
- Writing the RandomPossessions Tool
- NSArray and NSMutableArray
- Subclassing an Objective-C Class
- Instance variables
- Accessors and properties
- Instance methods
- Initializers
- self
- super
- Initializer chain
- Class methods
- Exceptions and the Console Window
- Objective-C 20 Additions
Chapter 3: Memory Management
- Memory Management Concepts
- Managing memory in C
- Objects and memory management
- Reference Counting
- Using retain counts
- Avoiding memory leaks with autorelease
- Managing memory in accessors and properties
- Retain count rules
- Managing Memory in RandomPossessions
Chapter 4: Delegation and Core Location
- Delegation
- Beginning the Whereami Application
- Using frameworks
- Core Location Service
- Receiving Updates from CLLocationManager
- For the More Curious: Compiler and Linker Errors
- For the More Curious: Protocols
- Challenge: Heading
Chapter 5: MapKit and UITextField
- Object Diagrams
- MapKit Framework
- Interface Properties
- Being a MapView Delegate
- Your Own MKAnnotation
- Tagging Locations
- Renaming an Application
- Challenge: Annotation Extras
- Challenge: Reverse Geocoding
Chapter 6: Subclassing UIView
- Creating a Custom View
- The drawRect: Method
- Instantiating a UIView
- Drawing Text and Shadows
- Using UIScrollView
- Zooming
- Hiding the Status Bar
- For the More Curious: Retain Cycles
- For the More Curious: Redrawing Views
- Challenge: Colors
Chapter 7: View Controllers
- Using View Controllers
- Creating the UITabBarController
- Creating View Controllers and Tab Bar Items
- Creating Views for the View Controllers
- viewWillAppear:
- The Lifecycle of a View Controller
- For the More Curious: Paging
- Challenge: Map Tab
Chapter 8: The Accelerometer
- Setting Up the Accelerometer
- Getting Accelerometer Data
- Orientation and Scale of Acceleration
- Using Accelerometer Data
- Smoothing Accelerometer Data
- Detecting Shakes
- Challenge: Changing Colors
Chapter 9: Notification and Rotation
- Notification Center
- UIDevice Notifications
- Autorotation
- Forcing Landscape Mode
- For the More Curious: Overriding Autorotation
- Challenge: Proximity Notifications
Chapter 10: UITableView and UITableViewController
- Beginning the Homepwner Application
- UITableViewController
- Subclassing UITableViewController
- UITableView’s Data Source
- UITableViewDataSource protocol
- UITableViewCells
- Reusing UITableViewCells
- Next Steps for Homepwner
- Challenge: Sections
Chapter 11: Editing UITableViews
- Editing a UITableView
- Begin and End Editing
- Deleting Rows
- Moving Rows
- Inserting Rows
Chapter 12: UINavigationController
- UINavigationController
- UINavigationBar
- An Additional UIViewController
- The XIB File and File’s Owner
- Setting Up ItemDetailViewController
- Navigating with UINavigationController
- Appearing and Disappearing Views
- Challenge: Number Pad
Chapter 13: Camera
- ImageCache: a Singleton
- NSDictionary
- Singletons
- UIImageView
- Giving Possessions an Image
- UUIDs
- Dismissing the Keyboard
- Challenge: Removing an Image
Chapter 14: Saving and Loading
- Application Sandbox
- Archiving
- Writing Other Data to Disk
- More on Reading and Writing to Disk
- Challenge: Archiving Wherewasi
Chapter 15: Low Memory Warning
- Low Memory Warning
- Handling Low Memory Warnings
- Be Careful
- Simulating Low Memory Warnings
Chapter 16: UITableViewCell
- Subclassing UITableViewCell
- Image Manipulation
- Archiving the Thumbnail Data
- Challenge: Accessory Views
- Challenge: Making it Pretty
Chapter 17: Multi-Touch
- Create a Drawing Program
- Touch Events
- The Responder Chain
- Instruments
- The ObjectAlloc Instrument
- The Sampler Instrument
- For the More Curious: UIControl
- For the More Curious: Touch Dependancy
- Challenge: Saving and Loading
- Challenge: Circles
Chapter 18: CALayer
- Creating a CALayer
- Layer Content
- Implicitly Animatable Properties
- For the More Curious: Programmatically Generating Content
- For the More Curious: Layers and Views
- Challenge: Dynamic Layer Content
Chapter 19: CAAnimation
- Spinning the Time with CABasicAnimation
- Timing Functions
- CAKeyframeAnimation
- For the More Curious: Presentation and Model Layers
- Challenge: More Animation
Chapter 20: Media
- The MediaPlayer Application
- Playing System Sounds
- Playing Audio Files
- Playing Movie Files
- Low-level APIs
- Challenge: Audio Recording
Chapter 21: Web Services
- The RandomNumbers Application
- Fetching data from a URL
- Parsing XML
- For the more curious: The Request Body
- For the more curious: Credentials
- Challenge: Cancel Fetch
Chapter 22: Address Book
- The People Picker
- Additions to Possession Class
- Address Book Functions
- For the More Curious: That Other Delegate Method
Chapter 23: Localization
- Internationalizing Homepwner
- NSLocale
- Localized Resources
- Strings Tables
- For the More Curious: NSBundle
Chapter 24: Bonjour
- Publishing a Service
- Browsing for Services
- TXT Record
- For the More Curious: Socket Connections
Chapter 25: Settings
- Settings Bundle
- NSUserDefaults
- Registering Defaults
- Using the defaults
Chapter 26: SQLite
- What Am I doing?
- The Interface
- Making the database
- Fetching
- Making and Using the Tree
- Challenge: Fetching more Data
Chapter 27: Core Data
- Inventory
- Edit the Model File
- AppController
- LabelSettingViewController
- LocationListViewController
- AssetListViewController
- CountViewController
- How it Works
- Trade-offs of Persistence Mechanisms
- Challenge: Deleting
Chapter 28: OpenGL ES
- Setting up an OpenGL ES Project
- Creating an OpenGL ES Capable View
- Creating the EAGLContext
- Frame and Render Buffers
- Creating the Timer
- The Rendering Method
- The Rendering Controller
- Rendering Shapes in OpenGL ES
- Start and Stop Animation
