UIButtons on tableFooterView not responding to events

前端 未结 1 1289
南方客
南方客 2021-01-14 08:04

I\'ve successfully added some UIButtons to a custom tableFooterView. The problem is that the button events does not get called. Also, the image relative to the UIControlSta

相关标签:
1条回答
  • 2021-01-14 08:38

    I do not think UIImageView was designed to work well as a container for other views, especially UIButtons. For one, UIImageViews, when created, have their userInteractionsEnabled property set to false by default.

    I would just create a simple UIView as your footer view and then add both the UIButton and the UIImageView directly to it.

    0 讨论(0)
提交回复
热议问题