Search code examples
iosobjective-cxcodeuitabbarcontrolleriad

How can I add an AdBannerView to a UITabViewController?


I have read through Apple's docs and referenced their infamous iAdSuite sample code. I have looked at many tutorials and stackoverflow posts and I still cannot arrive at the solution.

How can I prevent iAd from being unloaded, while being compliant with Apple's terms, while I am using a tabviewcontroller, and storyboard?

I have a tabBarController that splits into 3 separate UINavigationControllers with respective UIViewControllers.

Is there a way to add an AdBannerView to the UITabBarController? I have tried using a container view without success. What do I do?


Solution

  • One solution is to provide a view controller with the AdBannerView and a contentViewController. Embed the TabBarController in the contentViewController and then adjust the views as needed.