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;
    }

  • 相关阅读:
    麦茶商务的网站
    jQuery Ajax 实例 ($.ajax、$.post、$.get)
    关于meta知多少
    WebApp之Meta标签
    html5开发之viewport使用
    bootstrap
    8.8&8.9 dp训练小结
    2019.8.10小结
    2019.8.17 小结
    [NOI2001]炮兵阵地 题解
  • 原文地址:https://www.cnblogs.com/easonoutlook/p/2642844.html
Copyright © 2011-2022 走看看