Hello my code posted below is not dismissing my view no matter what i try. You can see my attempts to release the view in the hide splash function at the bottom. Please if anyone can help it would be greatly appreciated.
Thanks in Advance -- Zen
//
// SplashViewController.m
// Splash
//
#import "SplashViewController.h"
@implementation SplashViewController
- (void) didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (void) viewDidUnload {
}
- (void) dealloc {
[super dealloc];
}
-(void) showSplash {
modalViewController = [[UIViewController alloc] init];
modalViewController.view = modelView;
[self presentModalViewController:modalViewController animated:NO];
[activityIndicator startAnimating ];
//[self bigcalculation];
//[self performSelector:@selector(hideSplash) withObject:nil afterDelay:2.0];
}
- (void) viewDidAppear:(BOOL)animated {
NSLog(@"View Did Appear");
[self bigcalculation];
}
- (void) bigcalculation {
NSLog(@"Big Calc Start");
for (int i = 0; i <= 648230; i++) {
for (int j = 0; j <= 1200; j++) {
}
}
NSLog(@"Big Calc End");
[self performSelector:@selector(hideSplash) withObject:nil];
}
- (void) hideSplash {
NSLog(@"Hide");
//[self dismissModalViewControllerAnimated:NO];
//[[self parentViewController] dismissModalViewControllerAnimated:YES];
[[self modalViewController] dismissModalViewControllerAnimated:YES];
NSLog(@"End Hide");
}
@end