开发者

iPhone -> problem with UITextfield and NSString -> null value

I have an iPhone application and a proble开发者_StackOverflowm with Strings and UITextfields.

I have this in viewDidLoad::

NSLog(@"1: %@", self.myObject.myNSStringProperty);
self.aUITextFieldProperty.text = self.myObject.myNSStringProperty;
NSLog(@"2: %@", self.aUITextFieldProperty.text);

The output is:

2011-02-13 22:07:32.570 myProject [85241:207] 1: StringTest
2011-02-13 22:07:32.570 myProject [85241:207] 2: (null)

Why is the second output null?

Best Regards, Tim.


Blind guess: because aUITextFieldProperty is nil.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜