开发者

losing property-address in delegate-call

Hi i'm using a UITableViewController which has a @property (retain,nonatomic) NSString* name; which is filled from the previous ViewController. And it has a UITextField with a delegate=self On viewWillAppear i set the text of the Field. All wonderfully working...

But in - (BOOL)textFieldShouldReturn:(UITextField *)textField i got a nil-pointer to self.name

Is there something i don't know much about threads so could this be the sourc开发者_开发知识库e of the problem?

EDIT:

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
 self.title = textField.text;
 self.name = textField.text;  //Brakepoint self.name == nil
 [textField resignFirstResponder];
 return NO;
}


I called the TableViewController from two different NavigationControllers. One worked the other didn't. I got the bug only at one of them. The reference to name was from the other NavigationController....

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜