Strange error when popToRootViewController

I have a navigation based application in which I am viewing some view control. At the moment, I have 2 view managers. In the second viewcontroller, I have a condition that if it is true, I go to the first view manager with popToRooViewController. When I do this, the application will return to rootController, but the following will appear in the debugger console:

**-[UIWindow endDisablingInterfaceAutorotation] called on <UIWindow: 0x3c04dd0; frame = (0 0; 320 480); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x3c05b90>> without matching -beginDisablingInterfaceAutorotation. Ignoring. Terminating in response to SpringBoard termination.**

I do not know why this is happening.

I am creating a project as a navigation based application. In mainWindow.xib it has a navigationController, and as a subview it has a navigation bar and rootviewcontroller.

Then, in the root manager, root changes the viewController instead of the tableviewcontroller. The second viewcontroller is also a view manager.

Here is the code when I call rootcontroller.

 else if (emptyTasks == YES && returnAddTask == NO) { [self.navigationController popToRootViewControllerAnimated:YES]; // "Pushing the controller on the screen" returnAddTask = YES; } 

Thanks for the help!:)

+4
source share
2 answers

This answer comes from the comments on the question itself. This will simply respond with the hope that someone will vote for him, and therefore he can be moved away from the unanswered list.

Without using animation, an error message does not appear.

 [self.navigationController popToRootViewControllerAnimated:NO]; 
0
source

I have the same problem, but when I call popToRootViewController for a UIScrollView . It happens that a UIScrollView steals itself from its parent.

Decision

 [scrollview removeFromSuperview]; 

to popToRootViewController .

0
source

Source: https://habr.com/ru/post/1299100/


All Articles