2011-05-05 147 views
1

在我的视图控制器,我有:presentModalView没有显示出来

- (void)viewDidAppear:(BOOL)animated 
{ 

     LoginViewController* lvc = [[LoginViewController alloc] init]; 
     lvc.delegate = self; 
     [self presentModalViewController:lvc animated:NO]; 
     [lvc release]; 

} 

不过,这并没有显示出来。可能是什么?我试图做一个NSLog里面,它打印出来。

以下是我线它了:

enter image description here

这就是我把这个代码RootViewController的内部UISplitView应用

+0

尝试的NSLog(@“%@”,self.navigationController);如果没有,那么手头就有更大的问题。 – 2011-05-05 16:42:01

+0

我得到了,所以它不是零 – adit 2011-05-05 17:13:36

回答

0

事实证明,我有我的UIDetailView,这是试图做另一个弹出一个冲突的代码...

0

你链接查看到LoginViewController在IB?这是最常见的问题...

+0

看到我上面更新的图片...我认为它看起来很好 – adit 2011-05-05 16:40:29

+0

你有没有在你的班级宣布相应的XIB?也许你试试LoginViewController * lvc = [[LoginViewController alloc] initWithNibName:@“yourNib.xib”bundle:nil]; – tamasgal 2011-05-05 16:44:12

+0

,但没有工作以及 – adit 2011-05-05 17:08:09

0

如果登录您的navigationController不给你零,那么请尝试以下操作:

[self.navigationController presentModalViewController:lvc animated:NO]; 
+0

没有工作以及 – adit 2011-05-05 17:09:57

0

你可能正确地创建LoginViewController。尝试更换:

LoginViewController* lvc = [[LoginViewController alloc] init]; 

LoginViewController* lvc = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; 

你需要指定NIB从加载视图控制器。

+0

你的建议是一样的建议如下..它没有工作 – adit 2011-05-05 17:22:15