Yesterday debug program is almost on the line suddenly there is a bug found for a long time to find it is because of this warning but it took a day to solve the warning the various methods of eliminating the controller are not available
And with this bug, the real-world phone test is all right. There's a problem with this warning on the ipad.
The first solution tried to lower and lower the semi-finished code
Dispatch_after (Dispatch_time (Dispatch_time_now, (int64_t) (0.51 * nsec_per_sec)), Dispatch_get_main_queue (), ^{
if (![ Self.presentedviewcontroller isbeingdismissed]) {
[Self dismissviewcontrolleranimated:no completion:nil];
}
});
One of these 0.51 is actually a time interval but I tested it if it was set to 0.01 test 10 This bug will occur every time if 0.99 tests 20 times did not appear
Personally think that this number seems to be the probability of a percentage of the problem of the joy of throwing the interface to the game over there, say my side is the client finished to give the game to access under the test can use no I test can use
But a game on the other side of this method how to do it. Sometimes it is the first run can not run the third run again can, anyway is not find the law so this method for me or not
The second solution tried to completely use the upper and lower code
-(void) Viewdidappear: (BOOL) animated
{
[Super viewdidappear:animated];
[Self forcedupdateversionself];
}
That's right. Write the method you want to dismiss-(void) Viewdidappear: (BOOL) animated and I wrote
-(void) viewdidload, so it's always a mistake.
This error translates: Your view controller is still in the program and you are trying to erase your viewcontroller.
Understand that it should be your view has not been fully loaded successfully yet you have to eliminate the view so the computer may sometimes not understand what you want to do is to load or clear
Warning:attempt to dismiss from view controller <UIViewController:0x17d71c10> when a presentation or dismiss is I N progress!