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

      

  • 相关阅读:
    Gradle构建模块化项目
    线程池的理解与应用
    Redis理解
    kafka监听出现的问题,解决和剖析
    shiro利用过期时间,解决用户冻结踢出问题
    信息系统的运行与维护包含的主要内容
    软件维护的内容是什么
    执行顺序
    Chrome/Edge 91版本SameSite by default cookies被移除后的解决方案
    公从号编程
  • 原文地址:https://www.cnblogs.com/wq-gril/p/5138347.html
Copyright © 2011-2022 走看看