I am using sfTabView in a Xamarin Forms application and I have noted that removing a tab from the items collection when using versions 16.4.0.42 or 16.4.0.44 throws an exception on iOS, but works fine on version 16.3.0.36.
This is simple to re-create. The code snippet below will throw an exception on iOS with versions 16.4.0.42 or 16.4.0.44 but will work on 16.3.0.36 - the code snippet below will work on Android using all three versions listed in this post.
@this._tabView.Items.Remove(@this._tabView.Items.Last());
The exception that is thrown is an argument out of range exception. I have excluded the sfTabView specific portion of the stack trace below.
Collection`1[T].set_Item (System.Int32 index, T value)
SfTabView.Item_PropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e)
(wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangedEventArgs(object,System.ComponentModel.PropertyChangedEventArgs)
BindableObject.OnPropertyChanged (System.String propertyName)
Element.OnPropertyChanged (System.String propertyName)
Element.set_Parent (Xamarin.Forms.Element value)
SfTabView.Items_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
(wrapper delegate-invoke) <Module>.invoke_void_object_NotifyCollectionChangedEventArgs(object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index)
ObservableCollection`1[T].RemoveItem (System.Int32 index)
Collection`1[T].Remove (T item)