Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 31a97de

Browse files
jfversluisrmarinho
authored andcommitted
Added iOS version check for crashing code (#6862) fixes #6847
1 parent fbebbfc commit 31a97de

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,12 @@ protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
8181

8282
entry.InputView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight;
8383
entry.InputAccessoryView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight;
84-
85-
entry.InputAssistantItem.LeadingBarButtonGroups = null;
86-
entry.InputAssistantItem.TrailingBarButtonGroups = null;
84+
85+
if (Forms.IsiOS9OrNewer)
86+
{
87+
entry.InputAssistantItem.LeadingBarButtonGroups = null;
88+
entry.InputAssistantItem.TrailingBarButtonGroups = null;
89+
}
8790

8891
_defaultTextColor = entry.TextColor;
8992

0 commit comments

Comments
 (0)