- (UIImageView *)cicleImageView:(UIImage *)image frame:(CGRect)frame radius:(CGFloat)radius{
UIImageView *iv = [[UIImageView alloc]initWithFrame:frame];
iv.image = image;
iv.layer.cornerRadius = radius; // 设置半径
iv.layer.masksToBounds = YES; //边界是否允许截取
return iv;
}
网友评论