【发布时间】:2013-01-04 09:32:20
【问题描述】:
我的登录屏幕中有一个简单的 UITextView,我需要在其中显示条款和条件。条款和条件中有一个非常大的文本。在界面构建器中,我已将文本添加到 UITextView。在界面生成器中,文本正在正确显示。但是当我运行应用程序时 UITextView 是空的。如果我在 UItextView 中给出小文本,它会正确呈现,但不会显示大/大文本。
这里是代码。
- (IBAction)showTermsOfUse:(id)sender{
termsOfUseText.text = @"/***/";
termsOfUseText.scrollEnabled = YES;
[UIView beginAnimations:nil context:nil]; // begins animation block
[UIView setAnimationDuration:0.6]; // sets animation duration
[UIView setAnimationDelegate:self];
termsOfUse.frame = CGRectMake(0,0,320,416);
[UIView commitAnimations]; // commits the animation block. This Block is done.
}
【问题讨论】:
-
它是否被截断或向上滚动?
-
启用 textview 的滚动
-
它根本不显示/显示文本。是的.. 启用滚动。
-
你连接插座了吗? :p
-
@AnoopVaidya 我只在界面生成器中给出了文本,所以不需要将它连接到任何出口仪式?
标签: ios objective-c xcode uitextview