I found the solution to my problem. I was disabling the UITextField before asking for its value. For some reason, if I ask for the value before disabling it, the value is correct.
Update: The documentation for the UIControl setEnabled: method states that if its argument is NO, "any editing is aborted."