[英]Xamarin.iOS how do I change the status status bar color when there is no Navigation bar
[英]How to change the Tab Bar color in Xamarin iOS?
在visual studio更新標簽欄所選圖標的顏色后,有誰知道為什么?
這是我在更新之前用於更改顏色的代碼行
UITabBar.Appearance.SelectedImageTintColor = UIColor.Black;
Visual Studio 版本是 8.3.11
在Visual-studio-for-Mac 8.3.11或Visual Studio 16.4.2 中:
在 Xamarin Forms 項目中檢查后,它實際上無法在AppDelegate.cs
工作。 並沒有找到不工作的原因,但它也適用於 Xamarin.iOS 項目。最后,我在 Xamarin.Forms 項目中找到了一個解決方法。
如果是 Xamarin Forms Application ,則可以在SelectedTabColor
選項卡時修改選項卡的顏色。 如下 :
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
SelectedTabColor="Black"
xmlns:views="clr-namespace:AppTab2.Views"
x:Class="AppTab2.Views.MainPage">
'...
</TabbedPage>
注意:Xamarin Forms 的測試版本是4.4.0.991265
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.