Ios 隐藏Xamarin中的后退按钮文本
我想在iOS上的Xamarin中隐藏后退按钮的文本,我尝试过:Ios 隐藏Xamarin中的后退按钮文本,ios,xaml,user-interface,xamarin,Ios,Xaml,User Interface,Xamarin,我想在iOS上的Xamarin中隐藏后退按钮的文本,我尝试过: <Style TargetType="NavigationPage"> <Setter Property="BackButtonTitle" Value="" /> </Style> 还要加上这个 NavigationPage.BackButtonTitle = "" 如前所述,在MasterDetailPage的Main.xaml中,可以使用空字符串作为后退按钮标题: NavigationP
<Style TargetType="NavigationPage">
<Setter Property="BackButtonTitle" Value="" />
</Style>
还要加上这个
NavigationPage.BackButtonTitle = ""
如前所述,在MasterDetailPage的Main.xaml中,可以使用空字符串作为后退按钮标题:
NavigationPage.SetBackButtonTitle(this, "");
或者您可以将UIBarButtonItem
的标题设置为清晰
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// . . .
var attribute = new UITextAttributes();
attribute.TextColor = UIColor.Clear;
UIBarButtonItem.Appearance.SetTitleTextAttributes(attribute, UIControlState.Normal);
UIBarButtonItem.Appearance.SetTitleTextAttributes(attribute, UIControlState.Highlighted);
//. . .
return true;
}
请参阅此帮助:“NavigationPage.SetHasBackButton(此,false)”隐藏整个按钮,“UIBarButtonItem.Appearance.SetBackButtonTitlePositionAdjustment”隐藏文本,但导航栏上的后退箭头会更改其位置。这不会将所有工具栏项设置为没有文本颜色?
NavigationPage.SetBackButtonTitle(this, "");
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// . . .
var attribute = new UITextAttributes();
attribute.TextColor = UIColor.Clear;
UIBarButtonItem.Appearance.SetTitleTextAttributes(attribute, UIControlState.Normal);
UIBarButtonItem.Appearance.SetTitleTextAttributes(attribute, UIControlState.Highlighted);
//. . .
return true;
}