【发布时间】:2010-12-20 07:35:52
【问题描述】:
我正在开发一个用户需要先登录的应用程序。它实际上是一个 tabBar 应用程序,我在 didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 方法中加载了一个登录视图。这就是我所做的:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
// Override point for customization after application launch.
authView = [[AuthViewController alloc] init];
// Add the tab bar controller's view to the window and display.
[window addSubview:tabBarController.view];
[UIView beginAnimations:@"curldown" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:authView.view cache:YES];
[window addSubview:authView.view];
[UIView commitAnimations];
[window makeKeyAndVisible];
return YES;
[authView release];
}
我想要的是 First View 控制器等到这个登录视图被删除。有关更多详细信息,这是我在 authViewController 中删除 authView 的方式:
[UIView beginAnimations:@"curlup" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view.superview cache:YES];
[self.view removeFromSuperview];
[UIView commitAnimations];
【问题讨论】:
标签: iphone objective-c cocoa-touch xcode uiview