ios - Auto-resize label + UitableView. Doesn't resize -
i have table cell 3 labels. 2 of them has "lines: 0".
i set hugging , resistance priority http://www.raywenderlich.com/73602/dynamic-table-view-cell-height-auto-layout
and works fine, if tableview located in "tabbarcontroller". if put same tableview simple viewcontroller, label1 not expanding.
fine:
wrong:
i use 1 cell class , cell xib both of tables. , 1 class tables delegate/data source.
tables delegate:
func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { var cell = table.dequeuereusablecellwithidentifier("gravetableviewcell") as? gravetableviewcell if (cell == nil) { cell = nsbundle.mainbundle().loadnibnamed("gravetableviewcell", owner: self, options: nil)[0] as? gravetableviewcell cell?.configurecell(data[indexpath.row]) } return cell! }
Comments
Post a Comment