开发者

UITextField text property returns random integer

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜