示例#1
0
        void ReleaseDesignerOutlets()
        {
            if (InviewAdBtn != null)
            {
                InviewAdBtn.Dispose();
                InviewAdBtn = null;
            }

            if (LoadIntBtn != null)
            {
                LoadIntBtn.Dispose();
                LoadIntBtn = null;
            }

            if (LoadRwdBtn != null)
            {
                LoadRwdBtn.Dispose();
                LoadRwdBtn = null;
            }

            if (ShowIntBtn != null)
            {
                ShowIntBtn.Dispose();
                ShowIntBtn = null;
            }

            if (ShowRwdBtn != null)
            {
                ShowRwdBtn.Dispose();
                ShowRwdBtn = null;
            }
        }
示例#2
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);
            }
        }
示例#3
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);
 }