Skip to content

Quick to solve the UIView's(include UIImageView、UIButton、UILabel..) cornerRadius problem with just 1 line of code !

License

Notifications You must be signed in to change notification settings

yuehengwu/WyhCornerRadius

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Quick to solve the UIView's(include UIImageView、UIButton、UILabel..) cornerRadius problem with just 1 line of code !

Resources

License

Stars

Watchers

Forks

Packages

No packages published