Reputation: 8855
Is it possible/practical/beneficial to cache UIViewControllers at the startup of an app so that when they need to be presented (or pushed by a UINavigationController), the memory does not have to be allocated and they are already ready? Thanks
Upvotes: 0
Views: 527
Reputation: 385860
Sure it's possible. You can do it in your application delegate's application:didFinishLaunchingWithOptions:
method.
It's probably not particularly beneficial, though. If these things take a while to load, you're forcing the user to endure a long wait at app launch time. You're also loading view controllers before you even know if the user will need to see them.
Upvotes: 1