假设我在Images.xcassets中存储了一个被切片的图像;即设置了它的capInsets
属性,并且我希望在CoreGraphics中绘制大于其实际大小的图像。我该怎么做?
我是否必须使用capInsets
属性手动将图像分割成9个部分,然后手动增长/扩展9个部分,还是有更简单的方法?
发布于 2014-05-02 20:13:52
UIGraphicsBeginImageContext(litView.layer.frame.size);
[litImg drawInRect:litView.layer.frame];
UIImage *resizedImg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
https://stackoverflow.com/questions/22846903
复制相似问题