[英]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.