UIImageView *images = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 200, 200)];
images.backgroundColor = [UIColor redColor];
images.image = [UIImage imageNamed:@"1213"];
images.layer.masksToBounds = YES;
images.layer.cornerRadius = CGRectGetHeight(images.bounds)/2;
images.layer.borderWidth = 2.0f;
images.layer.borderColor = [[UIColor lightGrayColor]CGColor];
iOS 圆形图片
最新推荐文章于 2025-12-17 14:18:11 发布
本文详细介绍了如何使用Objective-C为UIImageView添加背景色、图片、圆角、边框及阴影效果,实现美观的UI界面设计。
303

被折叠的 条评论
为什么被折叠?



