Add completion handlers to the extensions#109
Conversation
|
👏 can we merge this? |
|
@fruitcoder I actually need to fix it, the completion handlers don't work. |
|
Hm :/ the code makes sense to me, do you have an idea why it's not working? |
|
Calling |
5141779 to
be1cd5b
Compare
|
Had a chance to test the This enables a more controlled way of notifying that all changesets were applied. Q: I would only ask if adding a default parameter like @ra1028 if you have the chance of looking into this PR 🙏 |
The reason I didn't do this is that these functions should never be called from anything other than the main thread (since they're calling UIKit functions), so made sense to call the completion block on the same thread. |
|
Totally agree @ellneal 👌 |
Checklist
Added tests.N/A.Description
Adds completion handlers to the UIKit/AppKit extensions.
This is a duplicate of #107 but I've taken a different approach to how the completion handlers are implemented (e.g. using a
CATransactionfor the non-closure based APIs).Motivation and Context
I'm using
DifferenceKitto create an API compatible version of theNSDiffableDataSourcefamily of classes that run on iOS 12 and earlier, which requires completion handlers.Impact on Existing Code
None. This is API compatible as the completion handlers are optional and default to
nil.