I present a view controller in a modal iOS application. The problem is that there is no crash and the application freezes as soon as currentViewController: animated is called. Statistics show that CPU usage is 100%, and usage does not decrease even after manually closing the application.
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
CustomModalViewController *vvc = [sb instantiateViewControllerWithIdentifier:@"CustomModalViewController"];
if(!vvc){
NSLog(@"ERROR!!! vvc is null");
}
NSLog(@"instantiate modal view controller");
vvc.providesPresentationContextTransitionStyle = YES;
vvc.definesPresentationContext = YES;
vvc.data = data;
NSLog(@"before presenting modal view controller");
[vvc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
[self presentViewController:vvc animated:YES completion:nil];
I tried to print some debug statements in the viewDidLoad of my custom class, but they are also not called.
I do not understand why the view controller is not displayed. Any help would be appreciated. I want to know in which case your application goes into an endless loop when you click the view controller or is this due to some other reason?
UPDATE:
XCode 7. , , SDK - UIKit LLVM. Mac Xcode 6.4, !!! , .
, ?