The application delegate

When an iOS application first launches, a lot of setup is happening behind the scenes. An instance of UIApplication is created to control the application’s state and act as liaison to the operating system. An instance of BNRAppDelegate is also created and set as the delegate of the UIApplication instance (which explains the name app delegate).

This makes BNRAppDelegate a busy class. In fact, all of the code that you will write for this application will be in BNRAppDelegate.m. It would be good to have a way to organize the class so that it would be easy to find methods quickly. You can use #pragma mark to group methods within a class for easier navigation.

In BNRAppDelegate.m, add a #pragma mark that identifies ...

Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.