UITextFields losing values after UINavigationController activity
Posted
by Dan Ray
on Stack Overflow
See other posts from Stack Overflow
or by Dan Ray
Published on 2010-06-10T13:09:28Z
Indexed on
2010/06/10
13:12 UTC
Read the original article
Hit count: 380
This is going to be hard to demonstrate in code, but maybe you can picture it with me.
I have a view that contains two UITextFields, "title" and "descr". That same view contains two UIButtons that push another controller onto the navController to get more detail from the user about the object we're assembling and ultimately uploading to my server.
It appears that pushing another view on, doing something, and popping it back off results in the two UITextFields keeping their content VISUALLY, but the .text property of those fields becomes NULL
. I've confirmed that if I do my two push-pop fields before filling in those UITextFields, I get my data when I upload, and if I do them in the opposite order, I don't. It LOOKS like there's data there, but I get nothing when I NSLog their .text properties.
Is this normal? Do I need to just design around this? Or is this as weird as it seems, and I should be looking deeper at causes of this?
© Stack Overflow or respective owner