Jake
Jake

Reputation: 13761

Corner radius in UIImageView inside UICollectionViewCell

I'm setting the corner radius of a UIImageView inside a UICollectionViewCell using user-defined attributes in interface builder. Most of the time the corner radius renders correctly, but sometimes the corners are colored in with a seemingly random color:

corners filled in

I've tried overriding layoutsubviews in my subclass of UICollectionViewCell and setting the corner radius there (as described in other stack overflow questions). I've also tried setting the corner radius in a couple other places, but nothing seems to work. How can I fix this?

Upvotes: 0

Views: 178

Answers (1)

Jake
Jake

Reputation: 13761

Wrapping the UIImageView with a UIView and setting the corner radius of the UIView ended up resolving the issue. Still curious as to why the problem was occurring though...

Upvotes: 0

Related Questions