I’ve a tabbar based app. And on each VC (tab) I have a JSON service call. What’s the best way to preload all the views on the tabs, so when users tap on the tab, it is already loaded? Is there any method to make a view load?
Tks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best way is to follow the MVC design pattern and make the service calls independent of the UI. When you app launches start loading all (using a singleton class or an instance of your “
ServiceCommunicator” class in theAppDelegate). Then when clicking on a particular tab and an UIViewController is loaded it would check up with your “ServiceCommunicator” class and if it’s still loading it data it will show some loading message otherwise it will display the downloaded data…