6

Storyboard iAd Tab Bar Controller sample project

1: Download sample project for Xcode 4.2

2: Make the banner visible above the Tab Bar from every view

3: post answer

4: recieve bounty

5: make other people happy, I will tutorialize it. No place existing tutorial for this important step atm.

ingenspor
  • 924
  • 2
  • 15
  • 37

2 Answers2

2

It's fairly simple actually. Just create a new banner view controller for each tab that will be the parent view controller for each tab in your storyboard. Then drag in a Container View object into each banner view controller and embed your child view controllers in each banner view controller.

Finally in BannerViewController.m replace the custom init method a method to override initWithCoder: where you will add the banner view controller to the banner manager. Also implement prepareForSegue: where you can set the _contentController to the segue's destination view controller.

My blog post goes into a lot more detail and links to an example project.

Steve Moser
  • 7,647
  • 5
  • 55
  • 94
0

Before we try anything drastic, try putting this code at the bottom of your appDidFinishLaunchingWithOptions, just before your return YES; call:

self.window.rootViewController = tabBarController;
[self.window makeKeyAndVisible];
Stretch
  • 3,669
  • 2
  • 28
  • 40
  • Thanks, but it made nothing different I think. Isn't that kind of the same as this line: UITabBarController *tabController = (UITabBarController *)self.window.rootViewController; – ingenspor Jul 30 '12 at 13:00
  • You keep changing your question text. If you want someone to code this for you I suggest you post a project on freelancer.com or elance.com. Good luck :) – Stretch Jul 31 '12 at 22:46
  • Yeah I changed it to a general sample so it will be easier and more general so others can use this in a without going through my personal codes to find what they want. Thanks for the advice, will do that if Apple's support mail doesn't make me wiser on the subject! – ingenspor Jul 31 '12 at 23:09