Cocoa Touch - Custom UIButton shape

后端 未结 3 1638
无人及你
无人及你 2020-12-06 14:53

How can I make the touchable button area to be of the same shape of the image provided?
Say I have a custom button with a triangle image, how can I make sure that only t

3条回答
  •  死守一世寂寞
    2020-12-06 15:39

    This feature is definitely not provided by the core cocoa touch classes related to a UIButton. I would guess you would have to look into subclassing UIButton and intercepting the taps as you mentioned.

提交回复
热议问题