[英]Can't change UITextField Text
-(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
)的文本? 謝謝。
有效。 我在setText:
之前添加以下代碼setText:
self.searchWord = [ [ UITextField alloc ] init ];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.