您的位置:首页 > 移动开发 > IOS开发

IOS 设置View背景色

2015-06-25 15:11 483 查看
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"]];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: