zoukankan      html  css  js  c++  java
  • 启动动画以及视图

    http://blog.csdn.net/zltianhen/article/details/6737958

    http://www.weste.net/2011/9-22/76761.html

    有两种方法

    //设置一个图片;
    UIImageView *niceView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)];
    niceView.image = [UIImage imageNamed:@"Default.png"];

    //添加到场景
    [self.window addSubview:niceView];

    //放到最顶层;
    [self.window bringSubviewToFront:niceView];

    //开始设置动画;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:2.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.window cache:YES];
    [UIView setAnimationDelegate:self];
    //這裡還可以設置回調函數;

    //[UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];

    niceView.alpha = 0.0;
    niceView.frame = CGRectMake(-60, -85, 440, 635);
    [UIView commitAnimations];
    [niceView release];

     

     

    给iOS程序上加了一个启动画面Default.png,下面是启动图片的加载代码:

    self.connectionTimer=[NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(timerFired:) userInfo:nil repeats:NO];
        [[NSRunLoop currentRunLoop] addTimer:self.connectionTimer forMode:NSDefaultRunLoopMode];
        do{
            [[NSRunLoop currentRunLoop]runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]];
        }while (!done);

    -(void)timerFired:(NSTimer *)timer{
        done = YES;
    }

  • 相关阅读:
    0-J2EE
    3-Spring
    linux部分常用命令
    linux配置bond
    免密登录和配置网卡
    配置网卡的子接口
    mysqldump备份
    python的数据结构
    mysql一主一从复制
    Python3 基本数据类型和类型转换
  • 原文地址:https://www.cnblogs.com/easonoutlook/p/2642844.html
Copyright © 2011-2022 走看看