Saturday, October 5, 2013

UITextField.tag At runtime, it is read-only?

I put a form on a UITextField defined as a property, then, I'm not in a form attached to this UITextField.tag value, but when I return to this form when, UITextField.tag or for 0, someone know why do?
Reply:
It does not have this problem. . What is wrong, you'd better look.
Reply:
1.debug see two windows are pointing to the same UITextField object, if not an object tag that ~ Of course, the behavior is not the expected
2 If the same object, since the definition of a class, the derived UITextField, and cover its tag attributes (setTag and tag method)
3 again debug, and set breakpoints within setTag way to see whether the tag value in your own assignment statement is changed outside
Reply:
I changed the ways to achieve the desired function, or to thank upstairs. .

No comments:

Post a Comment