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

      

  • 相关阅读:
    网络基础相关知识内容
    json模块的转义dump 和反转义 loap
    常用模块--time,sys,os,json
    正则表达式
    day_24 模块和包
    day23_内置函数(__del__ item系列 ,模块)
    LuoguP3806 【模板】点分治1 (点分治)
    BZOJ1305/Luogu3153 [CQOI2009]dance跳舞 (network flow)
    LuoguP2217 [HAOI2007]分割矩阵 (DP + memorized search)
    BZOJ3224/LuoguP3369 普通平衡树 (splay)
  • 原文地址:https://www.cnblogs.com/wq-gril/p/5138347.html
Copyright © 2011-2022 走看看