Beispiel #1
0
        //Mark: - Inview Ad

        public void InviewAdAction()
        {
            if (ivad == null)  //need to show ad
            {
                ivad = new ChocolatePlatformInviewAdDisplay(
                    ChocolatePlatform.AdUnitID,
                    ChocolatePlatformAdSize.InView,
                    this);
                ivad.LoadAd();
            }
            else     //need to close ad
            {
                ivad.RemoveFromSuperview();
                ivad = null;
                InviewAdBtn.SetTitle("Show Inview Ad", UIControlState.Normal);
            }
        }
Beispiel #2
0
 public void OnBannerAdLoaded(ChocolatePlatformInviewAdDisplay banner)
 {
     ivad.ShowIn(this.View, new CoreGraphics.CGPoint(this.View.Center.X, bannerAdVerticalPos));
     InviewAdBtn.SetTitle("Close Inview Ad", UIControlState.Normal);
 }