UIBarButtonItem not reacting after click

后端 未结 4 1570
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-29 05:27

From the rootViewController I navigate to a UIViewController

if (self.contr == nil) {
    ExampleViewController *controller = [[Exampl         


        
4条回答
  •  抹茶落季
    2021-01-29 05:36

    Presenting a modal view controller do not require you to pass through a UINavigationController. I suggest you to change this:

    [self.navigationController presentModalViewController:self.contr animated:YES];
    [self.navigationController dismissModalViewControllerAnimated:YES];
    

    to this:

    [self presentModalViewController:self.contr animated:YES];
    [self dismissModalViewControllerAnimated:YES];
    

    Let me know if this helps.

提交回复
热议问题