Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Implementing iAd on Several ViewControllers

I have implemented iAd in my App. But am trying have have adverts on several view controllers. The problem is that I have successfully been able to add an iAd onto my first controller but cannot get the ad to load on other controllers.

I have read that Apple recommend using one AdBannerView for the application. I have tried this. I implemented one global static iAd but it would not still only display an ad on one controller. I have also tried implementing on AdBannerView for each controller and still only one loads ads!

Any direction in implementing iAds in monotouch would be appreciated.

Thanks Ash..

    private ADBannerView TabAdvert;

    //  in the constructor
    TabAdvert = new ADBannerView();
    TabAdvert.AutoresizingMask = UIViewAutoresizing.All;
    TabAdvert.Hidden = true;

    public override void ViewDidLoad ()
        base.ViewDidLoad ();
        TabAdvert.Delegate = new MyAdBannerDelegate();
Sign In or Register to comment.