1

Currently have I implemented iAd and AdMob to each and every view controller in my Xcode project. I have about 6 view controllers and every time I switch back and forth between them one adbanner disappear and another appears. I want to make only one single adbanner for all view controllers. So even though its a transition between two view controllers, only one adbanner will be visible and it will not disappear and appear again.

But I also need to reach it from each class. So I can show it and hide it when I want to.

I would appreciate a ditailed step-by-step instruction.

INFO: I am using storyboard. I am developing for iOS 6.0 and higher. I am using navigation controller.

Peter
  • 1,848
  • 4
  • 26
  • 44

1 Answers1

0

So pass the banner view from one view controller to the next just as you'd pass any data. Install the view in the view hierarchy in each controller's -viewWillAppear method. You can pass the view between controllers in your -prepareForSegue method. If you're not sure how to pass objects between view controllers, search here -- here are many questions covering exactly that topic.

Caleb
  • 124,013
  • 19
  • 183
  • 272