코딩하는 나귀

applicationDidFinishLaunching: 함수 부분에 다음과 같이 추가해 주면 Default에서 애니메이션 효과로 전환되는 것을 볼 수 있다.

-(void)animationDidStop:(NSString*)animationID finished:(NSNumber*)finished    context:(void*)context

{
    UIView* backView = (UIView*)context;
    [backView removeFromSuperview];
    [backView release];
}

- (void)applicationDidFinishLaunching:(UIApplication *)application {
   
    // Add the tab bar controller's current view as a subview of the window
    [window addSubview:tabBarController.view];
   
    UIImage* backImage = [UIImage imageNamed:@"Default.png"];
    UIView* backView = [[UIImageView alloc] initWithImage:backImage];
    backView.frame = window.bounds;
    [window addSubview:backView];
    [UIView beginAnimations:@"CWFadeIn" context:(void*)backView];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:
     @selector(animationDidStop:finished:context:)];
    [UIView setAnimationDuration:1.0f];
    backView.alpha = 0;
    [UIView commitAnimations];   
}