//
//  GMLaunchImageController.m
//  Gengmei
//
//  Created by wangyang on 2017/5/16.
//  Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//

#import "GMLaunchImageController.h"

@interface GMLaunchImageController ()

@end

@implementation GMLaunchImageController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationBar.hidden = YES;
    UIImageView *image = [[UIImageView alloc] initWithFrame:self.view.bounds];
    image.image = [GMLaunchImageController getTheLaunchImage];
    [self.view addSubview:image];
    image.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
}

+ (UIImage *)getTheLaunchImage {
    NSString *imageName = @"launch_plus";
    switch ([UIDevice resolutionType]) {
        case iPhone35Inches:
            imageName = @"launch_4";
            break;
        case iPhone40Inches:
            imageName = @"launch_5";
            break;
        case iPhone47Inches:
            imageName = @"launch_6";
            break;
        case iPhone55Inches:
            imageName = @"launch_plus";
            break;
        case iPhone58Inches:
            imageName = @"launch_x";
            break;
        default:
            imageName = @"launch_plus";
            break;
    }

    return [UIImage imageNamed:imageName];
}

@end
