Why is my new view controller not appearing?

前端 未结 2 1128
小鲜肉
小鲜肉 2021-01-24 19:29

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)doChan         


        
相关标签:
2条回答
  • 2021-01-24 19:44

    Have you debugged and checked that your navigationController isn't nil ?

    0 讨论(0)
  • 2021-01-24 19:45

    You must check first from which button click action you are push viewcontroller That viewcontroller must be embed in UINavigationcontroller, after that you will able to push viewcontroller from that Navigation viewcontroller.

    Your parent Viewcontroller must be embed in UINavigationviewcontroller.

    0 讨论(0)
提交回复
热议问题