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.
精彩评论