A UIViewController takes about half a second to load its contents and appear on screen. How can I make them all load in the background and appear when they’re ready?
A UIViewController takes about half a second to load its contents and appear on
Share
There is a LazyTableImages sample on the Apple developer site.
It shows how to perform the heavy lifting in a background thread and update the UI on the main thread.
PerformSelectorInBackground:withObject:is a possible solution, although a more modern method would be to use asynchronous blocks. You can run code on the main thread from within these blocks to update the UI Safely.The Concurrency Programming Guide is a good place to find more information and examples of this.