Quick and easy to set UIView's corner radius and border(include UIImageView、UIButton、UILabel..)without off-screen Rendering problem in GPU.
快速设置UIView的圆角和边框,并且在GPU方面不触发离屏渲染
UIRectCorner ( UIRectCornerTopLeft、UIRectCornerTopRight、UIRectCornerBottomLeft、UIRectCornerBottomRight、UIRectCornerAllCorners )
pod search WyhCornerRadius
UIImageView :
//First eg:
[img wyh_autoSetImageCornerRedius:viewWidth/2 ConrnerType:rectCorner Image:[UIImage imageNamed:@"test.jpg"]];
//Second eg:
UIImageView *imageView = [UIImageView wyh_circleImageView];
UIButton :
//eg:
[btn wyh_CornerRadius:viewWidth/2 Image:imageNormal RectCornerType:UIRectCornerAllCorners BorderColor:[UIColor blueColor] BorderWidth:3 BackgroundColor:nil UIControlState:(UIControlStateNormal)];
UILabel :
//eg:
[label wyh_CornerRadius:viewWidth/2 Image:nil RectCornerType:rectCorner BorderColor:[UIColor magentaColor] BorderWidth:2 BackgroundColor:nil];
- JianShu: 被帅醒的小吴同志
- Email: [email protected]
- QQ:609223770