0

I'm trying to add an iAD to a TableViewController and it's working fine if I add the Container View at the top of TableView, and then in container I add an iAD. But I know, Apple will not accept Apps where iAD is scrolling, because of refreshing, etc... So I need to lock the container from scrolling at the top, but the table view must to be scrolling. So when I scroll up iAD scrollsup too..

View

Flask
  • 4,966
  • 1
  • 20
  • 39
sphynx
  • 413
  • 1
  • 7
  • 20
  • 2
    Why don't you you use an `UIViewController` with separate `UITableView` (smaller than full screen) and a dedicated view for an iAd? You could possibly also change the frame of `table` in `UITableViewController` but it's behaviour might complicate things up... – Rok Jarc Jan 05 '14 at 20:00

1 Answers1

0

Actually the first problem you have with the iAD inside a scroll is that your iAD will be more often hidden than showing.. and that would make your iAD stop giving you money.. and of course.. could make your app being rejected.

So.. the first question is: Do you really need a TableViewController?

You could use an ViewController with an iAD at the top.. and the tableview starting after it.

If you really want to use a TableViewController, the question now is: are you using sections in your tableview?

If you are not using, you can start right now and add your iAd to the first section header, if your table has just one section, the header will be always visible and the scrolling will pass content behind it, not in front of it.

But I would recommend the first option, use a normal ViewController and add an UITableView and your iAD.

Roberto Ferraz
  • 2,511
  • 24
  • 43
  • I'm getting data from JSON file which is in server and will be updated every day. If it is possible to make the same thing in ViewController, I'm going to rewrite everything. I'll try with header first, thanks. – sphynx Jan 05 '14 at 20:27
  • Yes it is possible, and you don't need to rewrite your code, just copy and paste your code to the viewcontroller (tableview delegate and data source, viewdidload, viewdidappear, viewwillappear, and your methods), just some small methods of tableviewcontroller are not needed.. then don't forget to mark the question as solved to remove it from the pending list.. – Roberto Ferraz Jan 05 '14 at 20:49