Search code examples
iosxamarinxamarin.iosback-button

set back button title text in iOS Xamarin


I want to set the BackButton Title text to ""(means empty). I am using below code to set the Title but it is not working.

Try 1 :

this.NavigationItem.BackBarButtonItem = new UIBarButtonItem("", UIBarButtonItemStyle.Plain, null);

Try 2 :

this.NavigationItem.BackBarButtonItem.Title = "";

it is give the object is not set to instance.

Is there any way to set the Back button title null in iOS.

Any Help Will be Appreciated.


Solution

  • For the workaround I do simple trick.

    before going to new UIViewController set the Title to "". and on Back button press when you come to ViewController inside the ViewDidAppearmethod set the Title again.