圆形图片

2016-01-25  本文已影响33人  小破孩丫

- (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;

}

上一篇下一篇

猜你喜欢

热点阅读