Posted By

Develomentional on 08/17/12


Tagged

Objective-c UIButton clipToBounds


Versions (?)

round coiners of button


 / Published in: Objective C
 

rounds corners of any button #import <QuartsCore/QuartsCore.h>

  1. #import <QuartsCore/QuartsCore.h>
  2.  
  3. +(void)roundButtonCorners:(UIButton *)button withRadius:(float)radius
  4. {
  5. button.layer.cornerRadius = radius;
  6. button.clipsToBounds = YES;
  7.  
  8. }
  9.  
  10. //usage
  11. [self rounduttonCorneers:self.yourButtonOutlet withRadius: 5.0f];

Report this snippet  

You need to login to post a comment.