0
TabbedPage活動標籤1後面選擇
我創建了一個TabbedPage
:Xamarin.Forms在iOS
<?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:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
prism:ViewModelLocator.AutowireViewModel="True"
x:Class="MyApp.Views.MainPage"
xmlns:local="clr-namespace:MyApp.Views;assembly=MyApp"
xmlns:resources="clr-namespace:MyApp.Common"
Title="{resources:Translate MainPage_Title}">
<TabbedPage.Children>
<local:MapsPage Icon="tabicon_mapspage.png" />
<local:ProfilePage Icon="tabicon_profilepage.png" />
<local:StatusPage Icon="tabicon_statuspage.png" />
</TabbedPage.Children>
</TabbedPage>
在Android上的標籤可以作爲你期望的那樣。但是,在iOS模擬器上,當前活動的選項卡始終爲1!如果我點擊「狀態」沒有任何反應,但是當我點擊其他任何地方(「地圖」或「個人資料」)時,顯示「狀態」。
我沒有自定義渲染器,我是否需要iOS版本才能使TabbedPage按預期行爲?
我已經把一個很小的項目在這裏這說明問題:https://github.com/RandomStuffAndCode/PrismApp
我測試你的項目,但不能重現你的問題,也許我誤解,你可以添加一個gif圖像來描述你的問題? –
感謝您花時間運行代碼。顯然它是由Visual Studio的遠程模擬器引起的一個bug。如果我在Mac上運行項目,我無法重現它。我已經通知了Xamarin這個問題,並且他們已經證實了這一點。 Gif here:https://media.giphy.com/media/l378AiPgcUFKLarmw/giphy.gif – user1202032