<分区>
<分区>
在单触摸中如何创建圆角图像。我需要将我的 UIImage View 转换为圆角 UIImage。有人有引用吗?
最佳答案
将此添加到您的
UIImage *image = [UIImage imageNamed:@"yourimage.jpg"];
UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, 1.0);
[[UIBezierPath bezierPathWithRoundedRect:imageView.bounds
cornerRadius:10.0] addClip];
[image drawInRect:imageView.bounds];
imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
关于ios - MonoTouch 创建带圆角的 UIImage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27183037/