xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

[Bug] CollectionView and iOS 9.3.5 #12977

Open KarlSearl opened 3 years ago

KarlSearl commented 3 years ago

Description

When using iOS 9.3.5 devices such as Ipad 2, app is crashing when navigating to a page with a CollectionView.

Steps to Reproduce

Bind ItemsSource of CollectionView to an ObservableCollection Modify this collection and notify the view Setting item layout from viewmodel tested on Xamarin forms 4.8 and 5.0 prep 1.

Expected Behavior

Items are displayed

Actual Behavior

The app crash

Basic Information

Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: UICollectionView received layout attributes for a cell with an index path that does not exist: <NSIndexPath: 0x19bed260> {length = 2, path = 1 - 0}

Version with issue: Xamarin.forms 4.8 and 5.0 pref Platform Target Frameworks: iOS: 9.3.5 Affected Devices: iPad 2

Workaround

none found

Environment

KarlSearl commented 3 years ago

Just a little note, been testing all day,

the issue seems to be when you use a grid, stackedlayout works