[英]simple question of pushViewController
messagecontroller is nothing but object of initialize nib file. messagecontroller只是初始化nib文件的对象。
[self.navigationController pushViewController:messageController animated:YES];
this statement executes in normal condition 该语句在正常条件下执行
this statement also works on state maintainace testing , this line executes properly but not open new view ,why? 该语句也可以用于状态维护测试,该行可以正确执行但不能打开新视图,为什么?
Calling this method call does not push a new view? 调用此方法调用不会推送新视图? If this is the question you should ask yourself some questions:
如果是这个问题,您应该问自己一些问题:
Is self
having an UINavigationController
? self
有一个UINavigationController
吗? Make sure self
is a view controller inside a navigation controller. 确保
self
是导航控制器内部的视图控制器。
Is messageController
initialized correctly? messageController
是否正确初始化? Like this for example (if messageController is an ivar): 像这样(例如,如果messageController是一个ivar):
messageController = [[MyViewControllerClass alloc] initWithNibName:@"MyViewControllerClassNibName" bundle:nil];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.