-
Notifications
You must be signed in to change notification settings - Fork 59
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
How to set the delegate? #8
Comments
Hi.
You need to attach a delegate like this:
textField.textInputFieldDelegates.add(delegate: self)
27 июня 2018 г., 08:31 +0300, ntkon <notifications@github.com>, писал:
… Hi @luximetr
I like this library and really want to use it, but I really need to get access to some delegate methods for when the text changes, didBegin/didEnd editing, shouldReturn etc.
How do I attach a delegate. When I try to do:
mField.textInputFieldDelegates = self
I get the error message:
Cannot assign to property: 'textInputFieldDelegates' setter is inaccessible
Can you advise me?
(PS Using AnyFormatKit (0.1.2))
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks @luximetr , but there is one other catch? The delegate does not tell me when the I need this so I can keep track of which field is being edited so that I can scroll my UIScrollView container so the user can see the field they are editing. Any suggestions? |
Sorry about the span @luximetr . I found that TextInputFieldDelegate solved my problem above. Another question I have is: I want to add a hook for when the text field has changed: The above works if the field has no formatter attached. How to I get this event when there is a formatter+TextInputController? Thanks. |
fixed by #21 |
Hi @luximetr
I like this library and really want to use it, but I really need to get access to some delegate methods for when the text changes, didBegin/didEnd editing, shouldReturn etc.
How do I attach a delegate. When I try to do:
mField.textInputFieldDelegates = self
I get the error message:
Cannot assign to property: 'textInputFieldDelegates' setter is inaccessible
Can you advise me?
(PS Using AnyFormatKit (0.1.2))
The text was updated successfully, but these errors were encountered: