Is there a way to set cornerRadius
for only top-left and top-right corner of a UIView
?
I tried the following, but it end up not seeing the
Emma: .TopRight
and .BottomRight
are not working for you perhaps because the call to view.roundCorners
is done BEFORE final view bounds
are calculated. Note that the Bezier Path
derives from the view bounds at the time it is called. For example, if auto layout will narrow the view, the round corners on the right side might be outside the view.
Try to call it in viewDidLayoutSubviews
, where the view's bound is final.