Details on below
stacktrace on bottom
xcode / ios
16.5
17.0
15.4
14.2
ok
ok
ok
14.3.1
error
error
ok
15.0(beta)
error
error
ok
==================
this bug happened when (left-right)swipe collectionView
I use reloadSection() for different cell count or size in some section.
this error happens below code
UIView.performWithoutAnimation {
collectionView.reloadSections(IndexSet.init(integer: section.rawValue))
}
I couldn't find any way to fix this problem. In my mind, it is right logic related collectionView but not exactly sure.
Question
If the problem is on my code, what can I try?.
I searched on google, asked ai-propt(openai, bing,bard) but these not helped
If the bug source is from Xcode or swift (or UIKit?)?
just wait?
Now, Xcode 14.2 is fine on any situation. is it safe to code on this version and upload appstroe? and even this ok, should I fix this bug from my code?
stacktrace
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid batch updates detected: the number of sections and/or items returned by the data source before and/or after performing the batch updates are inconsistent with the updates.Data source before updates = { 9 sections with item counts: [1, 1, 1, 0, 1, 0, 1, 1, 0] }Data source after updates = { 9 sections with item counts: [1, 0, 1, 0, 1, 0, 1, 1, 0] }Updates = [ Delete section 4, Insert section 4]Collection view: <UICollectionView: 0x105130000; frame = (0 74; 375 634); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x282dd60a0>; backgroundColor = <UIDynamicSystemColor: 0x283788b80; name = systemBackgroundColor>; layer = <CALayer: 0x2823724a0>; contentOffset: {0, -8}; contentSize: {375, 951.32993055555562}; adjustedContentInset: {8, 0, 60, 0}; layout: <UICollectionViewFlowLayout: 0x103ff0020>; dataSource: <Formation.MarketViewCell: 0x105047a00; baseClass = UICollectionViewCell; frame = (1125 -17; 375 768); clipsToBounds = YES; hidden = YES; backgroundColor = UIExtendedSRGBColorSpace 0.941176 0.956863 0.972549 1; layer = <CALayer: 0x282395ec0>>>'***
3
0
1.9k