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.
我有大小为 10x10 像素的图像,我需要将图像设置为 UIView 的背景,图像水平和垂直复制,而不是拉伸。可以用ios做吗?
你可以这样做:
view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bodyBG"]];
它默认水平和垂直复制。