Skip to content

Instantly share code, notes, and snippets.

@jls
Created April 19, 2010 00:11
Show Gist options
  • Save jls/370638 to your computer and use it in GitHub Desktop.
Save jls/370638 to your computer and use it in GitHub Desktop.
RoundedCorners.h
#import <Foundation/Foundation.h>
#import "QuartzCore/QuartzCore.h"
@interface RoundedCorners : NSObject {
}
+ (void) setView:(UIView *) view cornerRadius:(float) radius;
@end
@implementation RoundedCorners
+ (void) setView:(UIView *)view cornerRadius:(float)radius{
[view setClipsToBounds:YES];
view.layer.cornerRadius = radius;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment