How do I turn a rectangular image view into a circular image view that can hold shape in auto layout without setting width and height restraints? Thereby allowing the imageV
I have same problem, and Now I get what happened here, hope some ideas can help you: there are something different between the tows:
viewDidLoad
the size of bound and frame is different when viewDidLoad
and in storyboard,just because view is resize for different device size.
You can try it print(profileImageView.bounds.size)
in viewDidLoad
and viewDidAppear
you will find the size in viewDidLoad you set cornerRadius
is not the real "running" size.
a tips for you: you can use a subClass of ImageView to avoid it, or do not use it in storyboard,