Created
September 5, 2013 21:30
-
-
Save objectmethod/6456460 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
#import <QuartzCore/QuartzCore.h> | |
@property (weak, nonatomic) IBOutlet UIImageView *profilePictureView; | |
- (void) configureProfilePic { | |
[self roundProfilePic]; | |
[self addBorderToProfilePic]; | |
} | |
- (void) roundProfilePic { | |
float width = self.profilePictureView.frame.size.width; | |
self.profilePictureView.layer.cornerRadius = width / 2; | |
self.profilePictureView.layer.masksToBounds = YES; | |
} | |
- (void) addBorderToProfilePic { | |
self.profilePictureView.layer.borderColor = [UIColor whiteColor].CGColor; | |
self.profilePictureView.layer.borderWidth = 5.0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment