Download all table views when the application is running for the first time

I have a tab bar controller with 4 separate views. When I move from the first view to the second view, it takes some time to load the second view.

What I want to do is the ability to load and initialize all my views in the tab bar during my splash screen. Thus, when the user moves between tabs, there is no timeout.

How do I manually initialize individual tab bar windows in my application?

+4
source share
2 answers

To load a programmatic view as tabs, for example, in application:didFinishLaunchingWithOptions: you can:

 // load the third one, for instance thirdNavController = [tabBarController.viewControllers objectAtIndex:2]; [thirdNavController.topViewController loadView]; 
+3
source

I think accessing the view property of each of your controllers will load it (lazy loading). Although I do not think that you can have an absolute guarantee, it will not be unloaded before you use it, if the memory is full.

+2
source

Source: https://habr.com/ru/post/1334610/


All Articles