zoukankan      html  css  js  c++  java
  • 应用的启动视图 LauchView

    @interface AppDelegate ()
    @property(strong,nonatomic) UIImageView *launchImaViewO;
    @property(strong,nonatomic) UIImageView *launchImaViewT;
    @end
    @implementation AppDelegate
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        
        // 设置主窗口,并设置跟控制器
        //***
        //***
        self.window.backgroundColor = [UIColor whiteColor];
        
        [self customizeInterface];
        
        [self.window makeKeyAndVisible];
        
    //    [self setLauchView];
        
        return YES;
    }
    
    
    
    - (void)setLauchView {
        
        
        _launchImaViewT = [[UIImageView alloc] initWithFrame:SCREEN_BOUNDS];
        _launchImaViewT.contentMode = UIViewContentModeScaleAspectFill;
        [self.window addSubview:_launchImaViewT];
        
        _launchImaViewO = [[UIImageView alloc] initWithFrame:SCREEN_BOUNDS];
        _launchImaViewO.image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default@2x" ofType:@"png"]];
        [self.window addSubview:_launchImaViewO];
        
        [[AppRequestManager sharedManager] getRequestWithURL:@"start-image/720*1184" parameters:nil success:^(id responseObject) {
            
            [_launchImaViewT sd_setImageWithURL:[NSURL URLWithString:responseObject[@"img"]]];
            
            NSLog(@"%@",responseObject[@"img"]);
            
            [UIView animateWithDuration:2.0f animations:^{
                _launchImaViewO.alpha = 0.f;
                _launchImaViewT.transform = CGAffineTransformMakeScale(1.2, 1.2);
            } completion:^(BOOL finished) {
                [_launchImaViewO removeFromSuperview];
                [_launchImaViewT removeFromSuperview];
            }];
        } failure:^(NSError *error) {
            NSLog(@"===%@",error);
            
        }];
    }
    

      

  • 相关阅读:
    Backtracking_37. 解数独
    Backtracking_131. 分割回文串
    DFS_90. 子集 II
    DFS_78. 子集
    DFS_216. 组合总和 III
    非对称加密和ssh免密登陆验证、邮件发送接收、网站CA证书验证
    hibernate一对多哪一方放弃权利?
    关于java转json的一些细节问题
    一个web程序中访问频率较高的url为什么要加时间戳?(特别是异步加载)
    阿里电面经验
  • 原文地址:https://www.cnblogs.com/wq-gril/p/5138347.html
Copyright © 2011-2022 走看看