Graphics Programs Reference
In-Depth Information
This application is getting fairly large, as you can see in the massive object diagram. For-
tunately, view controllers and
UINavigationController
know how to deal with
this type of complicated object diagram. When writing iOS applications, it is important to
treat each
UIViewController
as its own little world. The stuff that has already been
implemented in Cocoa Touch will do the heavy lifting.
Now let's give
Homepwner
a navigation controller. Reopen the
Homepwner
project and
then open
HomepwnerAppDelegate.m
. The only requirements for using a
UINav-
igationController
are that you give it a root view controller and add its
view
to
the window.
In
application:didFinishLaunchingWithOptions:
, create the
UINavig-
ationController
, give it a root view controller of its own, and set the
UINaviga-
tionController
as the root view controller of the window.
- (BOOL)application:(UIApplication *)application