0
我已经尝试过这几天,并没有取得任何成功。 一旦启动应用程序,我就会加载各种XML数据。但是目前我还没有加载任何加载页面来显示加载的页面。我想添加一个显示我的数据加载的页面,然后将该加载视图页面推送到标签栏控制器页面。 有没有人有任何示例或任何想法分享它,将是非常有益的。如何将启动画面加载视图直到其加载
- (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;
}
我应该如何将加载视图控制器作为模式视图控制器添加到标签栏控制器顶部?我需要使用IB吗? – lifemoveson 2011-04-12 22:17:59
UITabBarController是UIViewController的一个子类。所有视图控制器都有一个名为presentModalViewController的方法:animated:。使用该方法呈现加载视图控制器。在应用程序代理中执行此操作。 – CharlieMezak 2011-04-12 22:24:30
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions :(NSDictionary *)launchOptions \t [navController.navigationBar setTintColor:[UIColor blackColor]]; \t LoadingViewController * lvc = [[LoadingViewController alloc] initWithNibName:@“LoadingView”bundle:nil]; \t [self.rootController presentModalViewController:lvc animated:YES]; \t [window addSubview:rootController.view]; \t [window makeKeyAndVisible]; \t [self URL]; \t [lvc release]; \t返回TRUE; } 我已经添加了如前所述的加载视图控制器,但现在如何删除加载视图控制器。 – lifemoveson 2011-04-12 22:29:56