为什么我的新视图控制器没有出现? [英] Why is my new view controller not appearing?
本文介绍了为什么我的新视图控制器没有出现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下代码来推送我的视图控制器,除非按下UIButton - 除了NSLog语句之外没有任何反应:
I am using the following code to push my view controller, except when the UIButton is pressed - nothing happens apart from the NSLog statement:
-(IBAction)doChangePasscode{
NSLog(@"Change Passcode Screen Loaded!");
ChangePasscode *cpscreen = [[ChangePasscode alloc] initWithNibName:@"ChangePasscode" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:cpscreen animated:YES];
}
我已经导入了相关文件(使用#import)所以一切都应该没问题......
I have imported the relavant files (using #import) so everything should be fine...
为什么会这样?
谢谢!
推荐答案
你调试过并检查过 navigationController
是不是nil?
Have you debugged and checked that your navigationController
isn't nil ?
这篇关于为什么我的新视图控制器没有出现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文