I'm in the process of converting my iphone app into ipad app. I use a presentModalViewController to open up the next view. It works on my iphone but I get the following error at the [self presentModalViewController:resultsViewController animated:YES]; when I use it on the ipad 4.3 simulator version:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ResultsViewController" nib but the view outlet was not set.
When I run it on the ipad 5.0 simulator version I only get a "Program received signal: SIGABRT" but I don't get he above error. I'm using the new xcode 4.2 and I find it weird I'm getting 2 different error results depending on which simulator I run it on. Does anyone know if the presentModalViewController works on ipad?
Here's my method:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ResultsViewController" nib but the view outlet was not set.
When I run it on the ipad 5.0 simulator version I only get a "Program received signal: SIGABRT" but I don't get he above error. I'm using the new xcode 4.2 and I find it weird I'm getting 2 different error results depending on which simulator I run it on. Does anyone know if the presentModalViewController works on ipad?
Here's my method:
Code:
-(IBAction)viewResults:(id)sender{
[self stopRepeatingTimer:self];
[self saveQuizTime];
[self saveResult];
NSString *tempTime;
if (totalTimerCount < 3600) {
tempTime = [[NSString alloc] initWithFormat:@"%02i:%02i", totalTimerCount/60, totalTimerCount%60];
} else {
tempTime = [[NSString alloc] initWithFormat:@"%02i:%02i:%02i", totalTimerCount/3600, (totalTimerCount%3600)/60, (totalTimerCount%3600)%60];
}
ResultsViewController *resultsViewController = [[ResultsViewController alloc] initWithNibName:@"ResultsViewController" bundle:nil];
resultsViewController.quizid = self.quizid;
resultsViewController.dateTaken = [NSDate date];
resultsViewController.timeString = tempTime;
resultsViewController.correctCounter = self.correctCounter;
resultsViewController.totalQuestions = totalQuizQuestions;
resultsViewController.quizSummary = self.quizSummary;
resultsViewController.parentView = @"Quiz";
resultsViewController.delegate = self;
resultsViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:resultsViewController animated:YES];
[resultsViewController release];
[tempTime release];
}