Setting textField.text programatically has some weird side effects on the titleLabel after interaction.
Can elaborate on what is the weird side effects?
The title label does not appear
Are you setting a placeholder? I will try now.
Yes, a placeholder is also set.
This is a confirmed bug. I will fix it today.
@danieldahan yes we are also facing the same issue if we set text programmatically the title label disappears with a weird animation. If you could fix this it would be great.
Hey, @danieldahan
After going through your code, I figured out that by setting the test field data programmatically the delegate methods are not getting invoked. Because of which the title label is not getting set.
Ex: When we type in text field the delegates are called and the title label is set, but when we set text like textField.text = "Something" then delegates are not called and title label is not set
I tried doing the following "hack," but didn't work, probably because of race conditions with the animations.
textField.sendActionsForControlEvents(.EditingDidBegin)
textField.text = "something"
textField.sendActionsForControlEvents(.ValueChanged)
textField.sendActionsForControlEvents(.EditingDidEnd)
Yeah that would cause an issue. I am working on documentation for this release today with a fix.
Hi @danieldahan,
We need this bug fixed very badly, how long does this take?
@mohpor @saipnc @zgosalvez Hi, I rewrote the TextField, under the temporary class MTextField and added an example of its usage in the Programmatic/TextField example project. My aim is to simplify the interface and have a cleaner code base going forward. @zgosalvez I have spent quite a bit of time making sure that it follows the spec as best as iOS can. There is a little more work to do, not much and then I can release it. I was hoping you guys would be able to take a look. I have also been working on a documentation site, which I will push later today.
Things to note:
Thanks guys, I will be finalizing this today, and then moving to AlertView, pulse animation, and SideNav.
This is all in the development branch.
@saipnc @zgosalvez please take part in this issue.
@saipnc You can now do this in the new TextField, temporary name MTextField, which is now in development. Please track any changes prior to release here 342. I am closing this issue to consolidate all TextField issues in 342.
@danieldahan Thank you so much!
Most helpful comment
@mohpor @saipnc @zgosalvez Hi, I rewrote the TextField, under the temporary class MTextField and added an example of its usage in the Programmatic/TextField example project. My aim is to simplify the interface and have a cleaner code base going forward. @zgosalvez I have spent quite a bit of time making sure that it follows the spec as best as iOS can. There is a little more work to do, not much and then I can release it. I was hoping you guys would be able to take a look. I have also been working on a documentation site, which I will push later today.
Things to note:
Thanks guys, I will be finalizing this today, and then moving to AlertView, pulse animation, and SideNav.
This is all in the development branch.