Add button to UITableViewCell's Accessory View

前端 未结 10 1869
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 16:41

Goal: when a user selects a cell, a button is added to that cell. Within my didSelectRowAtIndexPath function I have the following:

UIButton *downloadButton =         


        
10条回答
  •  时光说笑
    2021-01-01 17:17

    Its always best to add any views that you are adding to a cell to cell.contentView. Also try to check if the accessoryView is nil.

提交回复
热议问题