You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i really can't find the reason why this error is raised since everything is in line with your examples. I have never worked with CollectionView before, so maybe i'm missing something fundamental? Maybe it's because i try to implement this into a widget?
@IBOutlet weak var viewCollection: UICollectionView!
lazy var sapporo: Sapporo = { [unowned self] in
return Sapporo(collectionView: self.viewCollection)
}()
Then in viewDidLoad:
var models : [CollectionCellModel] = [];
for participation in participations {
let model = CollectionCellModel(title: participation.module.name, des: "", selectionHandler: {(cell) -> Void in
println(cell.cellmodel)
})
models.append(model);
}
sapporo[0].insert(models, atIndex: 1).bump()
leads to:
Widget[71046:859777] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update (2) must be equal to the number of items contained in that section before the update (2), plus or minus the number of items inserted or deleted from that section (2 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a85bc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c409bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010a85baca +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010acf898f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x000000010b72a78e -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:] + 12818
5 Sapporo 0x000000010c6438b3 _TFC7Sapporo7Sapporo6bumpMefS0_FOS_15SectionBumpTypeT_ + 899
6 Sapporo 0x000000010c64403e _TTWC7Sapporo7SapporoS_17SASectionDelegateS_FS1_6bumpMeUS1___fQPS1_FOS_15SectionBumpTypeT_ + 14
7 Sapporo 0x000000010c637427 _TFC7Sapporo9SASection4bumpfS0_FT_T_ + 759
The text was updated successfully, but these errors were encountered:
Hello,
i really can't find the reason why this error is raised since everything is in line with your examples. I have never worked with CollectionView before, so maybe i'm missing something fundamental? Maybe it's because i try to implement this into a widget?
Then in viewDidLoad:
leads to:
The text was updated successfully, but these errors were encountered: