Skip to content

Instantly share code, notes, and snippets.

@justin-nodeboy
Created February 14, 2016 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justin-nodeboy/06967529b14abe0fcd56 to your computer and use it in GitHub Desktop.
Save justin-nodeboy/06967529b14abe0fcd56 to your computer and use it in GitHub Desktop.
A little extension to UIImageView which makes a nice circular profile pic
extension UIImageView {
func resizeForProfilePic(){
self.layer.borderWidth = 1
self.layer.masksToBounds = false
self.layer.borderColor = UIColor.blackColor().CGColor
self.layer.cornerRadius = self.frame.height/2
self.clipsToBounds = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment