-
Notifications
You must be signed in to change notification settings - Fork 195
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
Clear input when we are adjusting frame #77
Conversation
This resolves issue venmo#76 When we are laying out subviews, we were already passing NO for adjustFrame. When we are reloading data, we were already passing YES for adjustFrame. It turns out that when we are not adjustingFrame, we do not want to clear the user-entered text, so reuse this boolean to keep from clearing the user text.
Has anyone had a moment to consider this PR? |
You're a significant contributor to this repo, and you seem to still be contributing to other venmo repos. Thank you for any advice |
Hi @walsh2000, no this repo is not dead. It’s been a bit difficult to keep up with all the issues and PR’s but we’re still using this in the Venmo codebase so it’s definitely not dead. Sorry for the lateness! Regarding this PR, it appears to a breaking change in that would affect other developers using this since the input is clearing on frame changes. Can you walk me through what the use case is? Thanks! |
Great news! Thanks for the reply. Before this PR, the VENTokenField will clear the text field when the VC rotates (portrait->landscape for example) Steps:
This PR does not clear the inputTextField.text when we're simply laying out subviews. It seems unlikely that existing clients would be relying on the text field being cleared in response to layoutSubviews. If you believe there are clients, I can add a property to clear/not-clear the textField on layoutSubviews. (Making the default be "do not clear"-- old behavior) Thank you again for your time |
Gotcha, thanks for clarifying. Will take a better look when I get to my
|
Realized I can merge PR’s from my phone. Thanks again! |
Clear input when we are adjusting frame
Excellent! Thank you looking into this one. |
Do you think you'll bump the podspec? Or should I pin to that revision? |
Hi @walsh2000! Sorry for the delay. We just released 2.5.1 so you should be able to point to that now. Thanks again fro your PR :D |
Good deal! Thank you very much. |
This resolves issue #76
When we are laying out subviews, we were already passing NO for adjustFrame.
When we are reloading data, we were already passing YES for adjustFrame.
It turns out that when we are not adjustingFrame, we do not want to clear the user-entered text, so reuse this boolean to keep from clearing the user text.