zoukankan      html  css  js  c++  java
  • 程序启动的时候,实现Default 图片向四周扩散的动画

    原理是作为在程序启动的代码里面生成一个UIImageView, 此view的图片就是程序中的Default.png图片。

    - (void)applicationDidFinishLaunching:(UIApplication *)application 

    [self showSplashView];

     





    - (void)showSplashView {
        splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 20, 320, 460)];
        UIImage *image = [[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Default.png"]];
        splashView.image = image;
    	[image release];
    	[window addSubview:splashView];
        [window bringSubviewToFront:splashView];
        [UIView beginAnimations:nil context:nil];
        [UIView setAnimationDuration:0.3];
        [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
        [UIView setAnimationDelegate:self];
        [UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];
        splashView.alpha = 0.0;
        splashView.frame = CGRectMake(-60, -40, 440, 600);
        [UIView commitAnimations];
    }
    
    - (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
        [splashView removeFromSuperview];
        [splashView release];
    }
    
    
    
    
    
    调用的时候:
    [self showSplashView];

  • 相关阅读:
    AMH4.2 Ftp账号路径修改设置
    过狗一句话
    破解tumblr背景音乐
    lnmp下安装ffmpeg和ffmpeg-php教程
    How To install FFMPEG, FLVTOOL2, MP4Box on CentOS server 2015 easy method
    自己的路删除
    弹出CPA
    JSON的相关知识
    JavaScript函数的相关知识
    JavaScript对象的相关知识
  • 原文地址:https://www.cnblogs.com/moshengren/p/1855965.html
Copyright © 2011-2022 走看看