List of Listings

 

Chapter 1. Building your first iOS application

Listing 1.1. CoinTossViewController.h

Listing 1.2. CoinTossViewController.m

Chapter 2. Data types, variables, and constants

Listing 2.1. Handling UITableView requests for the contents to display in the table

Listing 2.2. Example typedef from Core Location’s CLLocation.h header file

Listing 2.3. RootViewController.h

Listing 2.4. RootViewController.m

Listing 2.5. RootViewController.m

Chapter 3. An introduction to objects

Listing 3.1. Using substringWithRange: to obtain the last word in a string

Listing 3.2. Replacement tableView:cellForRowAtIndexPath: method implementation

Chapter 4. Storing data in collections

Listing 4.1. A property list XML file describing an array of three elements

Listing 4.2. Determining if an NSArray contains the word “Fish” using C-style code

Listing 4.3. Creating and destroying the city-to-geolocation mapping dictionary

Chapter 5. Creating classes

Listing 5.1. Defining the interface of the CTRentalProperty class

Listing 5.2. Providing an initial implementation of the CTRentalProperty class

Listing 5.3. Simplifying CTRentalProperty.h by using declared properties

Listing 5.4. Using synthesized properties to automatically generate setters and getters

Listing 5.5. Implementing a custom initialization method for CTRentalProperty

Listing 5.6. Merging allocation and initialization into one easy-to-call method

Listing 5.7. The typical lifecycle of an Objective-C object