Skip to content
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

Convert NSRange to Range before calling ShouldChange closure #1

Open
DG0BAB opened this issue Nov 1, 2020 · 1 comment
Open

Convert NSRange to Range before calling ShouldChange closure #1

DG0BAB opened this issue Nov 1, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@DG0BAB
Copy link
Owner

DG0BAB commented Nov 1, 2020

In the original delegate call textField(_:shouldChangeCharactersIn:replacementString:) and textView(_:shouldChangeTextIn:replacementText:) the parameter type for shouldChangeCharactersIn and shouldChangeTextIn is NSRange. This should be converted to Range before calling the ShouldChange closure.

@DG0BAB DG0BAB added the enhancement New feature or request label Nov 1, 2020
@DG0BAB DG0BAB self-assigned this Nov 1, 2020
@DG0BAB
Copy link
Owner Author

DG0BAB commented Nov 1, 2020

This should also be changed for the closures ShouldInteractWithAttachment(_: @escaping (TextInputType, NSTextAttachment, NSRange, UITextItemInteraction) -> Bool) and ShouldInteractWithURL(_: @escaping (TextInputType, URL, NSRange, UITextItemInteraction) -> Bool)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant