Troubleshoot iOS8

I have an application that works very well in iOS7.0 / 7.1. Since the last iOS update (8.0), showViewControllerAnimated is disabled each time. Has anyone seen the same thing?
I have control to call the second controller:

**detailViewController.delegate = self; [self presentViewController:detailViewController animated:YES completion:nil];** 

and in the close button I use this:

 **// Do something with the sender if needed [viewController dismissViewControllerAnimated:YES completion:NULL];** 

I used this ( Remove view controller from another view controller ) as a guide to implement the β€œsecond” control, but a crash appears again.

Any ideas?

+4
source share
1 answer

I had a very similar problem when I deviated programmatically. (for example, when the delegate completed the process).

I used this and it worked perfectly:

 if (![self isBeingDismissed]) { [self dismissViewControllerAnimated:YES completion:^{ }]; } 

He just checks to see if he has already been fired. Hope this works for you!

+5
source

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


All Articles