【发布时间】:2019-02-20 23:25:16
【问题描述】:
【问题讨论】:
标签: xamarin xamarin.forms
【问题讨论】:
标签: xamarin xamarin.forms
顶部栏只能是黑色或白色,或者如果您根本不想看到它,可以隐藏它。
底部(标签)栏,可以被影响,你可以在 iOS 上使用 Appearance APIs。例如,在您的 AppDelegate.cs 文件中添加这样的一行:UITabBar.Appearance.TintColor = Color.Red.ToUIColor();
可能还有更高级的场景,请在此处查看我的博客文章:https://blog.verslu.is/xamarin/xamarin-forms-xamarin/spicing-up-your-xamarin-formsios-tabbar/
以及 Xamarin.Forms 存储库上的(开放)PR,这将直接从 Forms 框架中实现这一点:https://github.com/xamarin/Xamarin.Forms/pull/4899
【讨论】:
在应用程序 delegates.cs 中找到 Finishlaunching 方法和所有以下代码。也相应地设置颜色。
UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(190, 18, 40); UINavigationBar.Appearance.SetTitleTextAttributes(新 UITextAttributes { TextColor = UIColor.Blue});
【讨论】: