tags:

views:

18

answers:

0

Hi,

I'm trying to call a method in my appDelegate file and for some reason I get "appDelegate may not respond to splashFade for the code [self splashFade]

Here's my code:


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Override point for customization after application launch
    [window addSubview:mainController.view];
    [window makeKeyAndVisible];
    [Appirater appLaunched];
    [self splashFade];
    return YES;
}


- (void)splashFade {
    splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 768, 1024)];
    splashView.image = [UIImage imageNamed:@"Default-Portrait.png"];
    [window addSubview:splashView];
    [window bringSubviewToFront:splashView];
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
    [UIView setAnimationDelegate:self]; 
    [UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];
    splashView.alpha = 0.0;
    [UIView commitAnimations];
}

- (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
    [splashView removeFromSuperview];
}

Thanks!