richard Stephenson
richard Stephenson

Reputation: 507

stop user changing tabs till app loads fully

im my app i have had to thread the loading of xml so the app loads and does not get kicked out by the os , but that also means that when the app loads and , the user selects one of the tabs that is still loading, it crashes.

is there any way i can stop them changing tabs till the app is fully loaded?

Thanks

Upvotes: 0

Views: 181

Answers (2)

Jeff Kelley
Jeff Kelley

Reputation: 19071

UITabBarController provides a delegate method called tabBarController:shouldSelectViewController:. Override that and return NO for any view controller you don't want to load.

Upvotes: 4

Sharjeel Aziz
Sharjeel Aziz

Reputation: 8535

You need to implement UITabBarControllerDelegate. Reference is here UITabBarControllerDelegate Protocol Reference

Upvotes: 0

Related Questions