UITextView setText不更新文本

use*_*957 6 interface-builder uitextview ios4 ios

在我的笔尖中,我有一个UITextView组件.

在我的代码中我有一个UITextView字段,我使用Interface Builder来确保两者是连接的(至少我认为我是通过从"文件所有者"拖动并将其放在UITextViewInterface Builder中并选择我的成员变量来实现的) .

现在,当我更新文本时setText,UITextView仍然是空白的.

谢谢DeShawn

小智 4

你用过吗

  @property(nonatomic,retain) UITextView *yourTextViewName;
Run Code Online (Sandbox Code Playgroud)

然后

  @synthesize yourTextViewName;
Run Code Online (Sandbox Code Playgroud)

在文件中.m

viewDidLoad如果是,请在更新值后使用以下代码进行检查:

   NSLog(@"Text View Value = %@",yourTextViewName.text);
Run Code Online (Sandbox Code Playgroud)