UITextView 内容未出现在 UIAlerView 中
内容约230行。它不会出现在 UITextView 中,除非您单击它并尝试向下滚动。否则,它是一个白色的空白视图。
有什么想法吗?
UITextView *termsOfService = [[UITextView alloc] initWithFrame:CGRectMake(20.0, 100.0, 245.0, 170.0)];
termsOfService.text = responseString;
termsOfService.font = [UIFont systemFontOfSize:13];
termsOfService.editable = NO;
termsOfService.delegate = self;
[alert addSubview:termsOfService];
The content is about 230 lines. It does not appear in UITextView except when you click on it AND try to scroll down. Otherwise, it is a white blank view.
Any ideas why?
UITextView *termsOfService = [[UITextView alloc] initWithFrame:CGRectMake(20.0, 100.0, 245.0, 170.0)];
termsOfService.text = responseString;
termsOfService.font = [UIFont systemFontOfSize:13];
termsOfService.editable = NO;
termsOfService.delegate = self;
[alert addSubview:termsOfService];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是因为 UIAlertView 不打算添加子视图。仅仅因为你可以,并不意味着你应该这样做。
Probably because UIAlertView isn't intended to have subviews added to it. Just because you can, doesn't mean you should.