Questions tagged [diffabledatasource]

92 questions
1
vote
1 answer

Is there a way to match Number of Sections match Dictionary Keys count in UITableViewDiffableDataSource

I am trying to Group names by first Character and display it in ViewController using the new UITableViewDiffableDataSource.(e.g. Contacts Application) **A** (header title) Apple Amazon **B** (header title) Broadcom Bezoz **C** (header…
1
vote
1 answer

Issue in DiffableDataSource tableview header

I'm using the tableView using DiffableDataSource and only issue which I've faced in header.I'm using viewForheaderSections method for calling header header view appear but on bottom position not top of the list please see the code thanks. extension…
Faheem
  • 97
  • 5
1
vote
0 answers

UICollectionview not showing up after init on iOS 13

This is a very specific question, but I am using UICompositional Layout combined with Diffable Data Source on my collection view, everything works fine on iOS 15, the issue is on iOS 13, what's going is: After init and viewDidLoad, collectionview…
1
vote
4 answers

iOS - Is there any method that will call after collection view loaded (set layout, set datasource)

I want to perform scroll to particular index path after collection view load complete. Is there any method that inform the collection view is loaded (set layout, set datasource) NOTE: Im using DiffableDatasource to display collection view. I tried…
1
vote
1 answer

How to Use NSTableViewDiffableDataSource to Load Data with NSTableView

I'm trying to learn how to use NSTableViewDiffableDataSource to load data with NSTableView. I am able to use UITableViewDiffableDataSource and UICollectionViewDiffableDataSource to load data in iOS because I have found some examples online. But I…
1
vote
1 answer

collection view list cell when the cell is added / deleted, how to update the indexPath of the cell?

I'm working on the collection view list cell and I was wondering how to update the indexPath when I use the diffable data source and snapshot on iOS14. In my ViewController's viewdidload, I called configureDataSource method which registers cell…
Yuuu
  • 715
  • 1
  • 9
  • 32
1
vote
1 answer

UITableViewDataSourcePrefetching->prefetchRowsAt always has 0 and 1 in indexPaths array

I have used UITableViewDiffableDataSource as the datasource for my tableView. On initial load, 8 items are fetched from server and displayed. When I try to scroll, func tableView(_ tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) { is…
1
vote
3 answers

Swift: Removing duplicate objects from array with a UUID

I am using a UUID to get the use of DiffableDataSource but I am working with a data set that has a duplicate of every object. Here is a sample of the code I am working with from a playground: var movies: [MovieSearch] = [] struct MovieSearch:…
1
vote
0 answers

Properly reload a UICollectionViewDiffableDataSource

So I'm having a screen with a Diffable DataSource List CollectionView that will be reloaded when a ManagedContext will be changed. My problem with the reload right now is that cells keep on randomly changing and most of the times they duplicate…
1
vote
0 answers

Limit size of diffable data source snapshots after calling performFetch

Problem After executing an NSBatchBatchInsertRequest and calling fetchedResultsController.performFetch(), the frc’s delegate method controller(_:didChangeContentWith:) is called with a NSDiffableDataSourceSnapshot that…
1
vote
0 answers

UICollectionViewDiffableDataSource Animations

Is it true that there’s no way to animate cells being added and removed using a UICollectionViewDiffableDataSource like there is using a UITableViewDiffableDataSource ? Looks like the tableView version has defaultRowAnimation property but nothing…
1
vote
0 answers

DiffableCollectionViewDataSource with different cell registrations

I've been trying to make a section for diffable collection view data source that could have a list of GenericItem where this class would have a property cellRegistration that would be of type UICollectionView.CellRegistration. After this class every…
1
vote
1 answer

UICollectionViewCompositionalLayout with horizontal or orthogonalScrollingBehavior has inconsistent item spacing near edge of screen

I have the following layout for my compositional layout func createLayout() -> UICollectionViewLayout { let layout = UICollectionViewCompositionalLayout { (sectionIndex: Int, layoutEnvironment: NSCollectionLayoutEnvironment) ->…
1
vote
2 answers

TableView with Diffable DataSource on MacOs

I am writing an application using MacOs Big Sur with Xcode 12.2. I am trying to implement a table view for a contact list (from examples on the internet). Most of the code is for IOS en hard to port to MacOS. For the most functionalities, the app is…
1
vote
2 answers

UITableView diffable data source

How to Create Multiple Section In Tableview Using Diffable DataSource.? I create Simple TableView using Diffable DataSource But I can't underStand How to Set Multiple Section With Tittle.?
Dhruv Nakrani
  • 23
  • 1
  • 5