Created
March 31, 2015 20:25
-
-
Save palmin/56c6347d5869cd29052c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface UIView (InspectableBorder) | |
@property (nonatomic, assign) IBInspectable CGFloat borderWidth; | |
@property (nonatomic, assign) IBInspectable CGFloat cornerRadius; | |
@end | |
@implementation UIView (InspectableBorder) | |
-(CGFloat)borderWidth { | |
return self.layer.borderWidth; | |
} | |
-(void)setBorderWidth:(CGFloat)borderWidth { | |
self.layer.borderWidth = borderWidth; | |
} | |
-(CGFloat)cornerRadius { | |
return self.layer.cornerRadius; | |
} | |
-(void)setCornerRadius:(CGFloat)cornerRadius { | |
self.layer.cornerRadius = cornerRadius; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment