应用的启动视图 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);
        
    }];
}

  

原文地址:https://www.cnblogs.com/wq-gril/p/5138347.html