Post

Replies

Boosts

Views

Activity

UIDesignRequiresCompatibility in a unit test
I have an app with thousands of snapshot tests, technically these are unit tests rather than UI tests, they take a snapshot of a view controller and compare the resulting image to a known image and fail if there are any changes. The app is not using Liquid Glass (yet) so I have added UIDesignRequiresCompatibility to my Info.plist file however this does not seem to be respected during my unit tests. Is there any way to run my snapshot tests on an iOS 26 simulator without using the new Liquid Glass UI?
Topic: UI Frameworks SubTopic: UIKit
0
1
64
Oct ’25
Specify queue for collapse/expand of section snapshots
Is there any way to use outline disclosure sections in a UICollectionViewDiffableDataSource without having to make all apply(_ snapshot:) calls from the main thread? Whenever I collapse or expand a section I get a warning about mixing main queue/off-main queue updates: Warning: applying updates in a non-thread confined manner is dangerous and can lead to deadlocks. Please always submit updates either always on the main queue or always off the main queue I understand what this means, but I am applying my section snapshots on a background queue to avoid interrupting the UI, it seems like the expand/collapse updates use the main queue and I cannot find any way to make it use the same queue as my other updates. Does this mean I must apply my own updates on the main queue now as well?
Topic: UI Frameworks SubTopic: UIKit
2
0
742
Jun ’24
How do I use query generation to prevent Core Data from modifying the view context while importing new objects in the background, whilst keeping existing objects modifiable?
How do I (can I?) use query generations to prevent Core Data from modifying the view context while importing new objects in the background, whilst keeping existing objects modifiable? I want to avoid every insert or delete from triggering UITableView updates until I am ready, but at the same time I want objects that are already in Core Data and being displayed by a UITableView to be able to be modified and have only those changes reflected in the view context, is there any way to do this?
0
0
593
Jun ’21
Performance when using UICollectionViewDiffableDataSource in conjunction with NSFetchedResultsController
I am having difficulty in getting acceptable performance when trying to use UICollectionViewDiffableDataSource in conjunction with a NSFetchedResultsController when the number of fetched objects is large (8000+). In comparison to using the NSFetchedResultsController directly as the data source, using a diffable data source and populating it with a snapshot in controller(_ :, didChangeContentWith:) is very slow. I have set my fetch request to a small batch size (20), the same exact fetch request populates the collection view almost instantly when using the NSFetchedResultsController as the data source via the usual collection view data source methods.
3
0
1.6k
Apr ’21