Example #1
0
        public IOSNativeAdView(NativeAdView view)
        {
            View = view;

            Agent = view.Agent ?? throw new Exception(".NativeAdView.Agent is null");

            var attributes = new ads.NativeAdViewAttributes {
                BackgroundColor = UIColor.Clear
            };

            var nativeAdView = Agent.Render(attributes);

            nativeAdView.Frame = View.GetFrame();

            Add(nativeAdView);

            view.RotateRequested.Handle(LoadNext);
            LoadNext().RunInParallel();
        }
Example #2
0
 public UIView Render(ads.NativeAdViewAttributes attributes) => ads.NativeAdView.Create(NativeAd, attributes);