Round view image in ios

I want to make an imageview round shape in ios to display any user's profile photo.

Is this possible with the layer.cornerRadius property layer.cornerRadius or do I need to find another solution?

Any help would be appreciated.

+4
source share
2 answers

yes, you can use layer.cornerRadius just remember to add layer.masksToBounds = YES;

+4
source

Using QuartzCore is the best solution for you, see this answer , it will help you.

Note. What applies on UIView will apply to UIImageView .

+1
source

Source: https://habr.com/ru/post/1434627/


All Articles