【发布时间】:2011-06-30 14:56:31
【问题描述】:
在我的应用委托中,我想为应用首次启动显示一个注册屏幕。
这是我的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window.rootViewController = self.tabBarController;
[[[self.tabBarController.tabBar items] objectAtIndex:2] setEnabled:NO];
[[[self.tabBarController.tabBar items] objectAtIndex:3] setEnabled:NO];
if (![self checkAuth]) {
SignupViewController * signUp = [[SignupViewController alloc] initWithNibName:@"SignupView" bundle:nil] ;
[signUp setManagedObjectContext:self.managedObjectContext];
[[self tabBarController] presentModalViewController:signUp animated:YES] ;
[signUp release] ;
}
[self.window makeKeyAndVisible];
return YES;}
一切正常,但我不希望我的 modalViewController 被动画化......
当我换行时:
[[self tabBarController] presentModalViewController:signUp animated:YES] ;
为:
[[self tabBarController] presentModalViewController:signUp animated:NO] ;
我的底层 tabBarController 显示了,我的 modalViewController 没有出现!
我花了很多时间搜索有类似问题的人,但我没有找到任何解决方案......
有人可以帮助我吗?
【问题讨论】:
标签: iphone ios4 delegates xcode4 modalviewcontroller