IOS 利用图片设置背景

     UIImageView* imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
     imageView.image = [UIImage imageNamed:@"背景灰.png"];
     self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"背景灰.png"]];
原文地址:https://www.cnblogs.com/SimonGao/p/4561304.html