Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to navigate from one Particular screen issue is only in iOS 11

The app is navigating to VC1 to VC2, in VC2 "Back", "Menu" & "Submit" Button are there on click of "Submit" displaying one alert with message and "Ok" button on click of "Ok" button I'm trying to pop to VC1, code is executing but navigation is not happening.

Same is happening for "Back" & "Menu" Buttons also code is executing but not navigating to any other pages. Using Xcode 9 beta 6.

The below piece of code I'm using in my project

NSArray *controllersArray = [[self navigationController] viewControllers];

        for(UIViewController *controller in controllersArray)
        {
            if ([controller isKindOfClass:[ViewController1 class]])
            {
                ViewController1 *accDetailVC = (ViewController1*)controller;
                [[self navigationController] popToViewController:accDetailVC animated:YES];
                break;
            }
        }

working in other iOS versions except for iOS 11 beta. Please help me on this if any one is facing the same issue.

like image 979
S P Balu Kommuri Avatar asked Nov 07 '22 20:11

S P Balu Kommuri


1 Answers

Issue got fixed while pushing from VC1 to VC2 before I'm using [[self navigationController] pushViewController:ctrl animated:YES] now changed as [[self navigationController] pushViewController:ctrl animated:NO]

like image 176
S P Balu Kommuri Avatar answered Nov 15 '22 12:11

S P Balu Kommuri