al
Aeline
2021-03-08 ce4eaddf9eb835f01e6bf5845a063d306f322b24
BuWanVideo2.0/AppDelegate.m
@@ -259,43 +259,47 @@
    if (width == 320.0f && height<=480.0f) {
        // iphone4 iphone4s 上的default图片
        _splash.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"320x480"]];
        imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"320"]];
        //imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"320"]];
        viewHeight = 55;
        
    }else if (width ==320.0f && height==568.0f) {
        // iphone5 上的default图片
        _splash.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"320x568"]];
        imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"320"]];
        //imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"320"]];
        viewHeight = 55;
        
    }else if (width ==375.0f) {
    } else if (width ==375.0f) {
        // iphone6 上的default图片
        _splash.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"375x667"]];
        imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"375"]];
        //imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"375"]];
        viewHeight = 63;
        
    }else{
        // iphone6 plus 上的default图片
        _splash.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"414x736"]];
        imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"414"]];
        //imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"414"]];
        viewHeight = 69;
    }
    if (KIsiPhoneX) {
        _splash.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"1125x2436"]];
       // _splash.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"1125x2436"]];
        //imageview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"414"]];
    }
    imageview.image = [UIImage imageNamed:@"375"];
    
    UIWindow *keyWindow = self.window;
    //self.startTime = CACurrentMediaTime();
    [self.splashAdView loadAdData];
    [keyWindow.rootViewController.view addSubview:self.splashAdView];
    
    self.splashAdView.frame = CGRectMake(0, 0, KScreenW, KScreenH - viewHeight);
    CGFloat screenH = [[UIScreen mainScreen] bounds].size.height;
    
    _bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, KScreenH - viewHeight, KScreenW, viewHeight)];
    imageview.frame = CGRectMake(0, 12, _bottomView.frame.size.width, _bottomView.frame.size.height - 6);
    //self.splashAdView.frame = CGRectMake(0, 0, KScreenW, screenH - viewHeight);
    
    [_bottomView addSubview:imageview];
    _bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, screenH - 100, KScreenW, 100)];
    _bottomView.backgroundColor = [UIColor whiteColor];
    imageview.frame = CGRectMake(0, 12, _bottomView.frame.size.width, 57);
    [_bottomView addSubview:imageview];
 
    [keyWindow addSubview:self.bottomView];