-
Notifications
You must be signed in to change notification settings - Fork 541
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
@discardableResult for becomeFirstResponder() and resignFirstResponder() #98
Conversation
@bennokress Thanks for the contribution. Your argument is valid, we should add My personal preference would be to move Would you mind doing that change? |
done ;) |
@bennokress Thanks 💥 👍 @k0nserv I think this one is safe to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR brings us closer to iOS api consistency, great contribution
Grat contriubtion, thanks @bennokress. Could you please rebase on master and add a change log entry in CHANGELOG.md following the general pattern in that file too. |
i'm new to pull requests (this is my first approved one), so i'm asking before doing commands:
|
No problem :)
|
…Responder() to suppress warnings when using textfield.becomeFirstResponder() without "_ = "
ok, I hope I did everything correctly (had to add an SSH key first to |
Did you push your last commit? I can't see the CHANGELOG.md commit either. You can use the http git url for the upstream if you'd like. I prefer SSH urls personally. |
Not all, everyone starts out not knowing about things. You just messed up the order of the add and the commit. You tried to commit before doing the Also don't use |
I see, now it's working :) |
Brilliant 👍 Thanks for the contribution |
Just released version 2.0.1 with this change. Thanks again @bennokress for the contribution, great job! 👌 |
happy to help 👍 |
When calling
textField.becomeFirstResponder()
ortextField.resignFirstResponder()
Xcode warns:In the example code this is avoided by prefixing all instances with
_ = ...
, but i like to keep my code clean, so the better solution is to add@discardableResult
to those functions in source. This way the result can be used just like before, if needed, but it doesn't have to be used.