Questions tagged [diffabledatasource]

92 questions
0
votes
1 answer

swift Diffable data source error - 'Fatal: supplied item identifiers are not unique. Duplicate identifiers:

I think there is a problem with the calendar model or the data I put in the pile, but I can't find it no matter how much I look for it. I'm desperate for help The contents of the error are as follows *** Terminating app due to uncaught exception…
0
votes
1 answer

Fatal: supplied item identifiers are not unique. Duplicate identifiers in DiffableDataSource

I'm trying to use DiffableDataSource collection view, I keep getting this error Fatal: supplied item identifiers are not unique. Duplicate identifiers Here is how I implement it extension UICollectionView { enum Section { case main …
0
votes
0 answers

Swift: Accessing sections when using diffable data sources?

I have a collection view with multiple sections and eventually multiple cell types. I've read that we should avoid using indexPath with using diffable data sources. Is the way I currently access sections defeat the purpose of using diffable data…
0
votes
0 answers

all ids ara unique but still getting error -> 'Fatal: supplied item identifiers are not unique

im using websocket and DiffableDataSource, when do search i filter my list and show results. if i switch on/off button of a cell and after deleting text and creating table again button app crashes. *** Terminating app due to uncaught exception…
Yosujiro
  • 1
  • 3
0
votes
0 answers

Binding view model and diffable data source

I want to delete the object from the snapshot using swipe to delete, but first I need to make a network call which is located in view model. If the result is success, then remove the object, otherwise do nothing. I am using custom view model class…
Marko Kos
  • 33
  • 8
0
votes
1 answer

UICollectionViewDiffableDataSource snapshot for static cell

In my UICollectionView, I have a header supplementary view that is static and doesn't receive any value to be configured. So, when I'm creating a snapshot for UICollectionViewDiffableDataSource, I need to pass something like () for this section as a…
FilM
  • 21
  • 1
  • 4
0
votes
1 answer

Objective-C Hashable object for Diffable Data Source

I am trying to implement a collection view with a diffable data source in Objective-C. I know for Swift, the generic types for UICollectionViewDiffableDataSource are types that conform to both the Hashable and Identifiable protocols. But I do not…
0
votes
1 answer

Swift Diffable Snapshot - Add new Section to Snapshot and Reload Collection View

I have a collection view that has sections and the beginning. I want to add a new section after the user creates data and display data in the new section. Here is the code I have tried but failed. The new section does not appear after running the…
0
votes
0 answers

Cannot get my cell to update with user edited info in diffable tableView

I am trying to create a Diffable tableView who's cells can be updated (info and layout) by the user (ie- hiding or showing a label or image that holds an optional property) in a separate editing tableview attached to the cell through a segue. I…
rBalmer
  • 67
  • 9
0
votes
1 answer

Applying NSDiffableDataSourceSnapshot to UITableViewDiffableDataSource cause 'NSInternalInconsistencyException'

I am trying to implement a UITableViewViewDiffableDataSource for my tableview. My code compiles fine, however I keep running into this error the first time I apply a snapshot to it, with the following error: Terminating app due to uncaught…
0
votes
1 answer

How to know when a collection view outline has been expanded?

I am using an outline view style UICollectionView setup and setting up my header cells like so: var content = cell.defaultContentConfiguration() content.text = brand.name ?? "Unknown" cell.contentConfiguration = content let headerDisclosureOption…
Carl
  • 683
  • 5
  • 18
0
votes
1 answer

UICollectionViewController + diffableDataSource - cell gets unhighlighted while your finger is still on it

If I am using UICollectionViewController with diffableDataSource and tapping on cell - it highlights, but then gets unhighlighted while I'm still holding finger on it. If to use UIViewController + collectionView with diffableDataSource - then…
0
votes
1 answer

UICollectionView Diffable Data Source with NotificationCenter and TabBarController

I have 2 UICollectionView controllers (a Storefront where customers can see all the products and Backend where I can CRUD items) that are embedded into a TabBarViewController. Both view controllers have separate data sources (initially they include…
0
votes
0 answers

Diffable Data Source in addition to older implementation

Is it possible to use the diffable data source in addition to supporting the older implementations for the lower ios versions.
SSS
  • 119
  • 9
0
votes
0 answers

Error when searching in the new UITableViewDiffableDataSource [Snapshotting]

I know that this is a common error and has been discussed many times, but hear me out. I've read a LOT of those posts and none of them mentions my specific case and I haven't been able to figure the solution out by myself. This is the error I'm…
DeepBlue
  • 591
  • 9
  • 18