![](/img/trans.png)
[英]What is the best way to create a 10x10 grid and print it in the console?
[英]Set UIImageView with size 10x10 as background for UIView
我的图像尺寸为10x10像素,我需要将图像设置为UIView的背景,并且水平和垂直复制图像,而不拉伸图像。 ios有可能吗?
您可以这样做:
view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bodyBG"]];
默认情况下,它是水平和垂直复制的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.