-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Prevent crash when adding item to source of CollectionView in tab #7940
Conversation
Adding a DNM for now - this also needs to handle the same edge case for grouping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Xamarin.Forms.Platform.iOS\CollectionView\GroupableItemsViewController.cs(33,68): Error CS1503: Argument 2: cannot convert from 'UIKit.UICollectionView' to 'UIKit.UICollectionViewController'"
Review
and some small conflicts. Code in itself seems to look good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/Users/runner/runners/2.158.0/work/1/s/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7700.cs(49,20): error CS0117: 'FlagTestHelpers' does not contain a definition for 'SetCollectionViewTestFlag' [/Users/runner/runners/2.158.0/work/1/s/Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj]
/Users/runner/runners/2.158.0/work/1/s/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue7993.xaml.cs(31,54): error CS0117: 'CollectionView' does not contain a definition for 'CollectionViewExperimental' [/Users/runner/runners/2.158.0/work/1/s/Xamarin.Forms.Controls/Xamarin.Forms.Controls.csproj]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Add some quick instructions to that first page on 7700? then merge?
…ab (xamarin#7940) * Prevent crash when adding item to source of CollectionView that's never been displayed; fixes xamarin#7700 * Fix renaming error in UI test * Add test and fix for adding groups offscreen * Fix rebase error * Remove flags * Add instructions * Better instructions
Description of Change
If
ItemsSource
implementsINotifyCollectionChanged
ItemsSource
on iOS 13 a layout error will be raised and the CollectionView will be left in a weird state. Pre-13, it'll just crash.
These changes detect that scenario and avoid the crash.
Issues Resolved
API Changes
None
Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
Testing Procedure
Automated test.
PR Checklist