UIImageView设置为圆形的方法:
_Image.layer.masksToBounds = YES;
_Image.layer.cornerRadius = self.Image.frame.size.width / 2;
设置加载本地图片的方法:
_Image.image = [UIImage imageNamed:@"Image"];//图片“Image”为xcassets里的set名称
时间: 2024-10-13 16:10:14
UIImageView设置为圆形的方法:
_Image.layer.masksToBounds = YES;
_Image.layer.cornerRadius = self.Image.frame.size.width / 2;
设置加载本地图片的方法:
_Image.image = [UIImage imageNamed:@"Image"];//图片“Image”为xcassets里的set名称