开发者

stop user changing tabs till app loads fully

开发者 https://www.devze.com 2022-12-30 08:33 出处:网络
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 wh开发者_运维知识库en the app loads and , the user selects one of th

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 wh开发者_运维知识库en 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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号