How to make Rounded Image avatar in iphone,along with circular coloured border.
- Create IBOutlet of the image from the storyboard to your View controller as-
__weak IBOutlet UIImageView *imagename;
- Now in your viewDidLoad insert-
imagename.layer.cornerRadius = imagename.frame.size.width / 2;
imagename.clipsToBounds = YES;
- For giving Circular coloured border use-
imagename.layer.borderColor = [UIColor buttonGreenColor].CGColor;
- For Width of the border you can use-
imagename.layer.borderColor = [UIColor buttonGreenColor].CGColor;
Thanks for reading.
0 Comment(s)