0

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?

H.N.
  • 1,207
  • 2
  • 12
  • 28

1 Answers1

0

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)

Adolfo
  • 1,862
  • 13
  • 19
  • When you say "Ad View over the TableView", you mean inside it? below my cells in the tableview? – H.N. Jan 03 '17 at 11:50