問題描述
如何在 UITextView 下添加 UIImageViews(UITextView 跨越整個屏幕) (How do you add a UIImageViews under a UITextView (the UITextView spans entire screen))
My UITextView has a description, but at the bottom of it, I want to add images underneath the last line of text. How do I do that?
UITextView* description = [[UITextView alloc] init];
description.frame = CGRectMake(0, 0, 320, 420);
description.text = [self.dict valueForKey:@"description"];
description.font = [UIFont systemFontOfSize:14];
[self.view addSubview:description];
EDITED: The text is not editable. What I really want to do looks like an app in the Apple App Store. After scrolling to the bottom of the description, there's a scrollable view of screenshots. I want to implement the same thing as that.
Thanks!
參考解法
方法 1:
Not sure I understand exactly what you're asking for, but look into UIScrollView and UITableView (a subclass of UIScrollView). A tableview might work best as you can add your textview to one cell, and then the image views in subsequent cells. If you can post additional details, I might be able to help more.
(by user1467188、Matt S.)