UIBarButtonItem not reacting after click

后端 未结 4 1571
佛祖请我去吃肉
佛祖请我去吃肉 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:31

    Try this in the goBack method :

      [self.navigationController popToRootViewControllerAnimated:YES];
    
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-01-29 05:45

    If you are not hitting the breakpoint that means you did not connect them properly in the xib.

    0 讨论(0)
  • 2021-01-29 05:47

    Have bind your Toolbar with File Owner?
    As your UIBarButton is subview of UIToolbar so you have to bind Toolbar with File Owner.

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