Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.39 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.39 KB

WyhCornerRadius

Quick and easy to set UIView's corner radius and border(include UIImageView、UIButton、UILabel..)without off-screen Rendering problem in GPU.

快速设置UIView的圆角和边框,并且在GPU方面不触发离屏渲染

The rounded corners direction of support :

UIRectCorner ( UIRectCornerTopLeft、UIRectCornerTopRight、UIRectCornerBottomLeft、UIRectCornerBottomRight、UIRectCornerAllCorners )

CocoaPods Support

pod search WyhCornerRadius

Example code :

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

Contact me