Questions tagged [uitableviewdiffabledatasource]

30 questions
5
votes
5 answers

TableView scrolling to top after applying UITableViewDiffableDataSource snapshot

I'm doing pagination using UITableViewDataSourcePrefetching. The values will be taken from the Realm local storage. I will get an array of objects. These values will be applied to the existing UITableViewDiffableDataSource datasource. After applying…
4
votes
1 answer

Diffable datasource performance issues with > 20K rows

I run into performance issues with the diffable data source when having a larger data set, around 22,000 items. I am surprised that applying the snapshot takes so much time when animation is ON. See the code section: let shouldAnimate =…
3
votes
0 answers

UITableViewDiffableDataSource cell provider fails to fetch newly added managed object, with temporary id, when reusing cells

The sample app has a table view that is powered by UITableViewDiffableDataSource that gets data from NSFetchedResultsController. You can add letters of the alphabet to the table view by pressing the plus button. To implement data source, I used this…
2
votes
1 answer

tableView(canEditRowAt) no longer working with tableViewDiffableDataSource

I created a fairly simple tableView for selecting a category for an item model. Everything was working fine yesterday. Today I have been trying to switch the tableView data source over to a UITableViewDiffableDataSource as I want to wrap my head…
2
votes
0 answers

Apply NSDiffableDataSourceSnapshot with same data results in a animation

I have a UITableView with a UITableViewDiffableDataSource in which I support a pull to refresh and a pagination. When I'm creating a new snapshot with the same data and apply that snapshot, it results in a weird animation where the first few…
2
votes
1 answer

UITableView And Diffable Data Source when supporting iOS 12 and 13

I have implemented UITableView Diffable Datasource in my project. It's working fine in IOS 13. When I run this application below iOS 13 Version then it gives me warning that it available on ios 13 only. so I am trying to implement UITableView for…
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

UITableViewDiffableDataSource are not deinit

I want to use a Combine in my project and face the problem. Here is the code of the ViewController import Combine import UIKit class ProfileDetailsController: ViewController { // // MARK: - Views @IBOutlet private var tableView:…
Ruben Nahatakyan
  • 372
  • 3
  • 13
1
vote
0 answers

UITableViewDiffableDataSource iPad issue

I have a crash error message - Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: itemIdentifier' I used a UITableViewDiffableDataSource to implement my UITableView. And when I…
Drugan
  • 144
  • 7
1
vote
0 answers

cellProvider doesn't update after section removal when using UITableViewDiffableDataSource

I have some code which loads in some empty sections and items. Then if there is a network connection some calls are made for the visible cells. I have a button in each section which navigates to another view based on the section type, which uses the…
Taylor Simpson
  • 940
  • 1
  • 10
  • 27
1
vote
0 answers

Trying to add functionality to be able to air Print a UITableView

I have a (to-do style) list app. the data is laid out in a diffable dataSource tableview with custom cells. I have a functioning dropdown menu and I'm trying to add a print button so the user can print out the list if they'd like (seems standard in…
1
vote
0 answers

Using Pagination and Pull To Refresh with a UITableViewDiffableDataSource

I have UITableViewController that supports both pagination and pull to refresh. I am trying to understand the correct way to handle Replacing all the data - pull to refresh Append new items - pagination I have an update method like the below. When…
0
votes
0 answers

How to make sections in todo list

I'm doing todo in Swift using diffable data source. private var todos = [[ToDoItem]]() // my dataSource enum Section { // my sections case unfulfilled case completed } By clicking on the knockout that is on the task, the task itself…
0
votes
0 answers

Why am I getting "Could not cast value of type '_NSCoreDataTaggedObjectID'" when using Diffable Data sources?

I'm trying to work with Diffable Data sources and have been hitting constant roadblocks. I have a very simple setup but am getting the "Could not cast value of type '_NSCoreDataTaggedObjectID' when using Diffable Data sources" when trying to apply…
0
votes
1 answer

Swipe delete in UIViewController with UITableView and UITableViewDiffableDataSource

I have a UIViewController with a UICollectionView and a UITableView. Both views use UICollectionViewDiffableDataSource and UITableViewDiffableDataSource respectively. In the table, I am trying to set up swipe functionality for the delete action. It…
1
2