温伟的程序生活,一步一个脚印
自己会努力,做真正独一无二的温伟!无论前方有多难,我都不会放弃... 每一篇日志,都是我的积累,全是我的原创!

- (void)viewDidLoad {

    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.//

    UIImage *image = [UIImage imageNamed:@"initial_page_bg.jpg" ];

    UIImageView *imageView = [[UIImageView alloc]initWithImage:image];

    CGRect cr=[[UIScreen mainScreen] bounds];   //获取屏幕

    imageView.frame = CGRectMake(0, 0, cr.size.width, cr.size.height);  //全屏显示图片

    [imageView setContentMode:UIViewContentModeScaleToFill];  //拉伸模式

    [imageView setClipsToBounds:YES];

    [self.view addSubview:imageView];  //显示

    [self.view sendSubviewToBack:imageView];  //背景设置

    

}

 

posted on 2016-09-03 22:36  winvay  阅读(618)  评论(0编辑  收藏  举报