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.
我正在尝试用 Pattern 填充 ImageView,但它的大小会增加而不是填充。
您可以通过执行从以前的图像创建可调整大小的平铺图像
tileImage = [originalImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0) resizingMode:UIImageResizingModeTile];
现在,您可以拍摄此图像并将其设置在任何图像视图中。图像将平铺以填充整个图像视图。