Warning: Attempt to present on whose view is not in the window hierarchy !, Attempthierarchy
When I want to jump from one VC to another
-(Void) presentViewController :( UIViewController *) viewControllerToPresent animated: (BOOL) flag completion :( void (^) (void) completion; you can also use navigation push.
Sometimes this type of Warning occurs: Warning: Attempt to present on whose view is not in the window hierarchy!
Cause: page Jump can only be performed after viewDidLoad and viewDidAppear.
Solution: Make sure that the page Jump is performed after the view load is complete.
First: Wait for the execution of view Load to end with a delay, but this method is time-consuming.
Method 2: Used in viewDidLoad
[Self?mselec=mainthread: @ selector (login) withObject: nilwaitUntilDone: NO];
Write the code for page Jump into the function, and then set waitUntilDone to NO