This is a very odd problem.
I include the .h file of the next view:
#import "MainGame.h"
The I have this code to switch rooms when I press the screen:
- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
MainGame *newview = [[MainGame alloc] initWithNibName:@"MainGame" bundle:nil];
newview.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:newview animated:YES completion:NULL];
}
And it works fine in the iOS 5 simulator; but when I test it on my iPod running iOS 4.2 it always just crashes.
All my IBOutlets are connected correctly and everything, as I’ve already said it works fine in the simulator but not on my iPod.
I have had each individual view working on my iPod before, so I am not using any features which require iOS 5 or anything; it’s just this code that switches views that is not working.
Am I missing something?
Thanks!
I believe its a version issue
doesn’t exist in iOS 4.2 but does in iOS 5
try this instead