码迷,mamicode.com
首页 > 移动开发 > 详细

IOS 设置View背景色

时间:2015-06-25 15:24:36      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:

    UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"01首页.png"]];

    

    imgView.frame = self.view.bounds;

    

    imgView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

    

    [self.view insertSubview:imgView atIndex:0];

 

或者在viewDidload使用

   self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImageimageNamed imageNamed:@"instrument_bg"]];

IOS 设置View背景色

标签:

原文地址:http://www.cnblogs.com/ajqfju/p/4600029.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!