How i display my scrollView on splash screen?

Posted by Rajendra Bhole on Stack Overflow See other posts from Stack Overflow or by Rajendra Bhole
Published on 2010-05-21T06:35:01Z Indexed on 2010/05/21 9:10 UTC
Read the original article Hit count: 321

Filed under:

HI, I develop an application in which i want to implement the splash screen, on that splash screen i want to bind the scrollView and UIImage. My code as follow,

-(void)splashAnimation{
    window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 420)];
    //scrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    scrollView = [[UIScrollView alloc] initWithFrame:[window bounds]];
    scrollView.pagingEnabled = NO;
    scrollView.bounces = NO;

    UIImage *image = [UIImage imageNamed:@"splash.png"];
    UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
    imageView.userInteractionEnabled = NO;  

    [scrollView addSubview:imageView];
    [scrollView setDelegate:self];
    //[scrollView release];


}

- (void)applicationDidFinishLaunching:(UIApplication *)application {    
    [self splashAnimation];
    [self initControllers];
    [window addSubview:[mainTabBarController view]];
    [window makeKeyAndVisible];
}

On my given code the one blank window comes up and stay on. I want to on that blank screen bind my splash.png.

© Stack Overflow or respective owner

Related posts about iphone