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; } }
//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); } }
public void OnBannerAdLoaded(ChocolatePlatformInviewAdDisplay banner) { ivad.ShowIn(this.View, new CoreGraphics.CGPoint(this.View.Center.X, bannerAdVerticalPos)); InviewAdBtn.SetTitle("Close Inview Ad", UIControlState.Normal); }