Exception occurs when there are no items in the collection and load on demand mode is automatic:
public ViewModel()
{
this.Source = new ObservableCollection<string>();
//for (int i = 0; i < 14; i++)
//{
// this.Source.Add(string.Format("Item {0}", i));
//}
this.LoadItemsCommand = new Command(this.LoadItemsCommandExecute);
}
With iOS 16 some changes are introduced to the UICollectionView. This breaks the layout of the ListView with dynamically sized items.
After I updated to `2021.1216.1-hotfix` (to solve this problem in Android and Google Material) the RadListView's LoadOnDemand automatic stopped working
Workaround:
I've had to downgrade Xamarin.Google.Android.Material to v1.1.0.5 and use the latest stable release of Telerik UI v2021.1.119.1 which restored the functionality.
Changing a property on an item that is involved with grouping and sorting and then removing and re-adding the item to the collection results in the list being in an invalid state (e.g. duplicate items, incorrect template, etc.)
Error message can be reproduced on iPhone 11 Simulator iOS 13.6
[UICollectionView] Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update (4) must be equal to the number of items contained in that section before the update (4), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out). - will perform reloadData. UICollectionView instance: <TKCollectionView: 0x7f8525b86600; baseClass = UICollectionView; frame = (0 0; 414 725); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x600001232bb0>; layer = <CALayer: 0x6000019b0520>; contentOffset: {0, 0}; contentSize: {414, 453}; adjustedContentInset: {0, 0, 0, 0}; layout: <TKListViewLinearLayout: 0x7f8524f5e400>; dataSource: <Telerik_XamarinForms_DataControlsRenderer_iOS_TKExtendedListView: 0x7f8524f5b590; frame = (0 0; 414 725); layer =
<CALayer: 0x6000019b03a0>>>; currentUpdate: [UICollectionViewUpdate - 0x7f8526897fc0: old:<UICollectionViewData: 0x6000025f4000> new<UICollectionViewData: 0x6000025f47e0> items:<(
"I(0,3)"
)>]
ListViewLoadOnDemandCollection method is not triggering in iOS automatically when there is a need to display the items on the screen. We have to manually scroll the list view then the ListViewLoadOnDemandCollection triggers and give further data to show.
Things are working fine on Android platform.