Slavik
Slavik

Reputation: 234

My corner radius is applying to only one corner

Hi I'm using this extension how to set cornerRadius for only top-left and top-right corner of a UIView? to apply rounder corners to my UIViews, however after the update to swift 3.0 the extension stopped working for UIViews that appear on top of other views.

Upvotes: 0

Views: 244

Answers (2)

maddy
maddy

Reputation: 26

I had the same problem, activate 'Clip to Bounds' in the Storyboard

Upvotes: 0

pedrouan
pedrouan

Reputation: 12910

Put this line right before all of your ...layer.cornerRadius = lines in your controllers:

self.view.layoutIfNeeded()

Upvotes: 1

Related Questions