self.window.rootViewController vs window addSubview

Posted by Gazzer on Stack Overflow See other posts from Stack Overflow or by Gazzer
Published on 2011-03-09T16:00:49Z Indexed on 2011/03/09 16:10 UTC
Read the original article Hit count: 223

Filed under:
|

I've noticed a lot of examples for iPhone apps in the Application Delegate

- (void)applicationDidFinishLaunching:(UIApplication *)application

have

[window addSubview: someController.view]; (1)

as opposed to

self.window.rootViewController = self.someController; (2)

Is there any practical reason to use one over the other? Is one technically correct? Do controller's have the an equivalent command to number (2) like

self.someController.rootController = self.someOtherController; // pseudocode

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c