Can anyone tell me why this code crashes with SIGABRT unrecognised selector sent to instance, on 4.3 simulator, but works just fine on iOS 5 simulator?
matchSetup = [[viewMatchSetup alloc]initWithNibName:@"viewMatchSetup" bundle:nil];
[matchSetup setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentViewController:matchSetup animated:YES completion:NULL];
Thanks in advance
FIX: [self presentModalViewController:matchSetup animated:YES]; //Modal being the required change
It crashes because the
presentViewController:animated:completion:method ofUIViewControlleris not available on iOS 4.3. It was introduced in iOS 5. Since you don’t use the completion block, simply use the “old” methodpresentModalViewController:animated::