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

      

  • 相关阅读:
    阿里云slb实现多域名https
    docker容器互连
    ext4文件系统(转)
    Effective Java 读书笔记(四):泛型
    Effective Java 读书笔记(一):创建和销毁对象
    Effective Java 读书笔记(三):类与接口
    Effective Java 读书笔记(二):对象通用方法
    三种TCP协议聊天室实现
    WebSocket协议探究(三):MQTT子协议
    WebSocket协议探究(二)
  • 原文地址:https://www.cnblogs.com/wq-gril/p/5138347.html
Copyright © 2011-2022 走看看