Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Custom page renderer

$
0
0

Hi all.

I have a custom page renderer in iOS where when it passes through the ViewWillAppear I want to add a button to the nav bar. I think you do it like this as i can't see a way to add it when in the forms project. Code is below, but doesn't seem to add the button at all. Any ideas? Many Thanks, Stuart.

public override void ViewWillAppear (bool animated)
{
base.ViewWillAppear (animated);

var btn = new UIBarButtonItem (UIImage.FromBundle ("threelines")
    , UIBarButtonItemStyle.Plain
    , (sender, args) => {

    });

this.NavigationItem.SetLeftBarButtonItem (btn, true);

}


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>