-(void)histWordPushed:(NSString*)histword{
self.word=histword;
[self.searchWord setText:self.word];
NSLog(@"search word %@",self.searchWord.text);
NSLog(@"word %@",self.word);
}
在此代码中,self.searchWord.text为null,但self.word不是。如何设置searchWord(UITextField
)的文本?感谢。
答案 0 :(得分:0)
有效。我在setText:
self.searchWord = [ [ UITextField alloc ] init ];