Multiple lines of a label in a custom UITableviewCell

后端 未结 5 1622
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-19 23:34

I have searched around for any tip for my problem. But I cannot find a solution for this.

I have made a subclass of UITableviewCell (FeedCell). With one image and t

5条回答
  •  -上瘾入骨i
    2021-01-20 00:13

    I know this is an old post, but it came up when I was searching.

    I got an example like this by following http://www.raywenderlich.com/73602/dynamic-table-view-cell-height-auto-layout.

    I think for iOS8 the following is required:

    • Setting the lines to 0
    • Setting the word wrap
    • Setting the label size to be >= 20
    • Making sure there are enough constraints to determine the cell height (height of title and vertical spacing)

提交回复
热议问题