Ad Banner inside a TableView

533 views Asked by At

I have a table view controller with cells in it. I wanted to put a view for an ad banner in the bottom of the tableview (like a footer but always in the bottom). For example if I have 1 cell, the cell would be on the top of the screen and the banner in the bottom. If I have 20 cells, the banner should appear in the bottom of the screen, and all the other cells would have scroll... (only appear a few in screen).

Can I do this with the table view controller? Or do I need to have a view controller and set inside it a table view and another view for the ad banner?

1

There are 1 answers

1
Adolfo On BEST ANSWER

You have to add you Ad View over the TableView. In order to show all table view cells you must add a contentInset property.

This contentInset property must be initialized with the same height value of your Ad View.

That prevent the Ad View to hide the last cell (the bottom one)