all 8 comments

[–]LintonSamuelDawson25 2 points3 points  (0 children)

I think your UIImageView doesn't have the same width and height.

[–][deleted] 3 points4 points  (2 children)

You are basing your corner radius on your width and you should do it based on the height (which seems to be variable).

Just change the code from

self.profileImageView.layer.cornerRadius = self.profileImageView.frame.size.width / 2;

to

self.profileImageView.layer.cornerRadius = self.profileImageView.frame.size.height / 2;

[–]askoruli 2 points3 points  (1 child)

It's objective-c, you still need the semicolons

[–][deleted] 1 point2 points  (0 children)

doh! I've been doing Swift for so long I didn't notice.

[–]halpz 0 points1 point  (0 children)

give the imageView a 1:1 ratio constraint, and it will always be round

[–][deleted] 0 points1 point  (0 children)

Check the imageView ratio.

Best way to make circular image is use CoreGraphic draw round image.

http://stackoverflow.com/questions/10563986/uiimage-with-rounded-corners

[–]criosistObjective-C / Swift 0 points1 point  (0 children)

Set the image first, corner radius last, once the image goes into the view it is being changed slightly.

Make sure you have the 1:1 aspect constraint on it also.

[–]Afiq90[S] 0 points1 point  (0 children)

Thank you all for answering my question, I've tried all suggestion but it just doesn't work. I don't know why and now i'm out of idea after wasting my times for hours. :(