如图所示,仔细算了一下,因为XX回复XX。这两个必须 “XX”(回复的用户)是一个view,”回复“又是一个view,XX(被回复的用户)这又是一个view。
然后回复内容又是一个view。。这样算下来。需要四个view。一个cell里面四个,50个cell的话,就是200个,这些view渲染太耗资源了,另外一个问题,还是布局比较复杂,比如文字换行,得给他换行,自适应宽度高度等等。麻烦呀。
有其他解决思路吗?
现在发觉还是css控制比较简单。像这样,加个a标签搞定。
欢迎选择我的课程,让我们一起见证您的进步~~
You can take a look at NSAttributedString
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
You can take a look at NSAttributedString
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