ios 评论列表 XX回复XX 这些应该怎么布局?
天蓬老师
天蓬老师 2017-04-18 09:45:52
0
5
660

如图所示,仔细算了一下,因为XX回复XX。这两个必须 “XX”(回复的用户)是一个view,”回复“又是一个view,XX(被回复的用户)这又是一个view。

然后回复内容又是一个view。。这样算下来。需要四个view。一个cell里面四个,50个cell的话,就是200个,这些view渲染太耗资源了,另外一个问题,还是布局比较复杂,比如文字换行,得给他换行,自适应宽度高度等等。麻烦呀。

有其他解决思路吗?

现在发觉还是css控制比较简单。像这样,加个a标签搞定。

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(5)
伊谢尔伦

You can take a look at NSAttributedString

PHPzhong

I will tell you another plan. . . . Just use autolayout, don't set the width but just set the horizontal spacing. . .

伊谢尔伦

I also encountered this problem. I want to put a tableView in the reply area to store these replies, but the height of the tableView cannot be dynamically constrained. Is there any solution?

迷茫

I would like to ask how to use NSMutableAttributedString to jump to the interface by clicking on the name

刘奇

NSAttributedString Correct solution, one label is enough

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template