Adding a view (image view) in between two UITableViewCells

后端 未结 2 1194
予麋鹿
予麋鹿 2021-01-24 06:31

I have created a UITableView programatically. And i am loading it with data. I want to insert an advertisement Banner (clickable button which is equal to cell\'s he

2条回答
  •  一向
    一向 (楼主)
    2021-01-24 06:50

    No, it's not possible. The table view owns its whole area, and renders cells based on it's internal logic.

    You could divide your table view into sections and add a custom cell as a section header or footer, or you could make your cellForRowAtIndexPath serve up a custom type of cell for every 4th row that ONLY contains your full-sized button. That should accomplish your goal.

提交回复
热议问题