-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add completion handlers to the extensions #109
base: master
Are you sure you want to change the base?
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
CATransaction
for the non-closure based APIs).Motivation and Context
I'm using
DifferenceKit
to create an API compatible version of theNSDiffableDataSource
family 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
.