Forum Xamarin.Forms

Allow iOS PageRenderer to render as custom UIViewController

PaulBrennerPaulBrenner USUniversity ✭✭

Summary

Update the PageRenderer class so that it can render as a custom UIViewController instead of just a UIViewController

API Changes

I propose two ways of doing this.

Make PagerRenderer generic, so the user can set the page like so:

CustomPageRenderer : PageRenderer

or, add a SetNativeControl() function so the user can set what control to render as, such as:

var myPage = new MyCustomUIViewController();
SetNativeControl(myPage);

Intended Use Case

There are a lot of libraries out there that are just classes that inherent from UIViewController, we can't really use them since PageRenderer will only render a Xamarin forms page as a UIViewController.

Tagged:

Open · Last Updated

Posts

  • DandiAndyDandiAndy Member

    +1

  • I would also like a custom UIViewController for Xamarin.forms.
    It's needed for integrating UnityAds or Facebook.Audience.Network
    and avoid the nightmare that is AdMafia... aka. AdMob

Sign In or Register to comment.