UITextView 内容未出现在 UIAlerView 中

发布于 2024-08-25 05:23:53 字数 420 浏览 4 评论 0原文

内容约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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

各自安好 2024-09-01 05:23:53

可能是因为 UIAlertView 不打算添加子视图。仅仅因为你可以,并不意味着你应该这样做。

Probably because UIAlertView isn't intended to have subviews added to it. Just because you can, doesn't mean you should.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文