Search code examples
iosxamarinxamarin.formsxamarin.iosios12

Xamarin Picker View invalid selection iOS 12


Below is the sample code already shared in Xamarin docs.

 <Picker>
  <Picker.ItemsSource>
    <x:Array Type="{x:Type x:String}">
      <x:String>Baboon</x:String>
      <x:String>Capuchin Monkey</x:String>
      <x:String>Blue Monkey</x:String>
      <x:String>Squirrel Monkey</x:String>
      <x:String>Golden Lion Tamarin</x:String>
      <x:String>Howler Monkey</x:String>
      <x:String>Japanese Macaque</x:String>
    </x:Array>
  </Picker.ItemsSource>
</Picker>

When running this code in iOS 12 simulator, it works but when you tap done button, selected item is changed and is assigned to 4th item in the list from the selected item.

For Example, if you select Baboon from above list and tap done button, selected item will be changed to Golden Lion Tamarin.

I am not sure if the issue is only related iOS 12 or not. I am downloading previous version simulators to see.

I have uploaded video recording of simulator here, can anyone please guide if it is OS related issue or something else?

Thanks,


Solution

  • Solution as mentioned here (Clearing simulator contents) worked.

    The problem was with Xcode simulator, not sure what caused this issue.