When I try to get the text of a UITextField it returns a random integer. Here's the code I used:
NSLog(@"Field Text: %d", field.text);
field
being the UITextFi开发者_JS百科eld. And in the debugger it returns an random number, for example 29876208
when there is text in the UITextField.
Euhm, I think you are either getting back some kind of representation of the memory address the text is located, or just some bull-sh*t.
You should try to do this:
NSLog(@"Field text : %@", field.text);
The problem is the formatter you are using.
精彩评论