我有包含骨折图像和标签的《国际调查》意见,因为我们知道《国际调查意见》是直截了当的,如果我把《国际调查》的意见转换为“UIImage”也只是 rec,我想使UIImage像一个胎面形象一样,因为如果用户点击背景,UIImage事件也会被称作。 我想将《国际不动产业联合会》的意见转换到无其背景的UIImage?
我使用这种方法改变对UIImage公司的意见。
-(UIImage *) ChangeViewToImage : (UIView *) view{
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
Hmm.. example like this, I have a rectangle as a UIView and a triangle as a shape in UIView. and then I want to make this UIView become a UIImage, but I just want the triangle without background, so the image just a triangle.. how can I do It?