-
-
Save Tintenklecks/8615650 to your computer and use it in GitHub Desktop.
Mask an UIImageView to a circle.
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
- (void)viewDidLayoutSubviews | |
{ | |
[super viewDidLayoutSubviews]; | |
self.imageView.layer.masksToBounds = YES; | |
self.imageView.layer.cornerRadius = self.imageView.bounds.size.width / 2.; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment