Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 如何设置视图的背景图像?
如何将 UIView backgroundColor 设置为 UIimage
view.backgroundColor = [UIColor redColor];
我需要设置为 UIImage。
myView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.png"]];