Customizing the back button in IOS for navigation page

Hello, I'm trying to change the color of the back button in IOS for the my navigation pages, by writing a custom renderer. The only thing that works in this code is Navigation bar appearance. NavigationItem has a null value on the attribute BackBarButtonItem.

Any ideas?

[assembly: ExportRenderer(typeof(NavigationPage), typeof(Domstol.iOS.CustomBackButton))]

namespace Domstol.iOS
{

public class CustomBackButton : NavigationRenderer
{
    public override void ViewDidLoad()
    {
        base.ViewDidLoad();

        UINavigationBar.Appearance.BarTintColor = UIColor.DarkGray;


        NavigationItem.BackBarButtonItem = new UIBarButtonItem("CustomTitleHere",
                                                               UIBarButtonItemStyle.Plain, null);
        NavigationItem.LeftBarButtonItem = new UIBarButtonItem("CustomTitleHere",
                                                               UIBarButtonItemStyle.Plain, null);
    }

}

Answers

Sign In or Register to comment.