iOS Setting the Root View Controller in IB or programmatically
Are there any differences in performance by setting the Root View Controller in IB (by setting the rootViewController
outlet for window to f00
controller or by setting it in the Application开发者_开发技巧 Delegate by self.window.rootViewController = self.f00;
Which route would be the recommended route?
no real performance issues: in a simple application, either is fine,
in a more complex application, the root view might change,
and if you retain the last view being displayed (as user guidelines suggest)
you will want to wait until appDid…
where you can make the decision to load
the standard root view or not,
in that situation, there would be a performance hit because you loaded a view/nib that wasn't needed at application launch (but will likely be used later)
精彩评论