开发者

simple question of pushViewController

开发者 https://www.devze.com 2022-12-22 19:11 出处:网络
messagecontrollerisnothing but object of initializenib file. [self.navigationController pushViewController:messageController animated:YES];

messagecontroller is nothing but object of initialize nib file.

[self.navigationController pushViewController:messageController animated:YES];

this statement executes in normal condition

this statement also works on state maintainace testing , this line executes p开发者_StackOverflowroperly 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:

  1. Is self having an UINavigationController? Make sure self is a view controller inside a navigation controller.

  2. Is messageController initialized correctly? Like this for example (if messageController is an ivar):

    messageController = [[MyViewControllerClass alloc] initWithNibName:@"MyViewControllerClassNibName" bundle:nil];
    
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号