How to push Splash Screen Loading View till its loaded
I have tried this for past few days and have not got any success yet. I am loading various XML Data once the application is launched. But currently I have not loaded any 开发者_JAVA技巧loading page to show the loading of the page. I would like to add a page which shows loading of my data and then push that loading view page to the tab bar controller page. Does anyone have any example or any idea to share it, will be really helpful.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions {
[navController.navigationBar setTintColor:[UIColor blackColor]];
LoadingViewController *lvc = [[LoadingViewController alloc] initWithNibName:@"LoadingView" bundle:nil];
// Adding the modal view controller to loading View controller on Main Tab bar controller. Hope its correct
[self.rootController presentModalViewController:lvc animated:YES];
[window addSubview:rootController.view];
[window makeKeyAndVisible];
[self URL];
[lvc release];
return TRUE;
}
There are lots of ways to do something like this. One option is to create a viewcontroller that shows your loading view. add your tab bar controller to the window. Then present the loading view controller as a modal view controller over the tab bar controller. Then start your xml parsing, and dismiss the modal controller when the parsing is finished.
精彩评论