Rounded UIView using CALayers - only some corners - How?

后端 未结 14 2033
南方客
南方客 2020-11-22 13:53

In my application - there are four buttons named as follows:

  • Top - left
  • Bottom - left
  • Top - right
  • Bottom - right

Abov

14条回答
  •  心在旅途
    2020-11-22 14:21

    Rounding only some corners won't play nice with auto resizing or auto layout.

    So another option is to use regular cornerRadius and hide the corners you don't want under another view or outside its superview bounds making sure it is set to clip its contents.

提交回复
热议问题