jiexishede
jiexishede

Reputation: 2613

How I only use the storyboard no use the code to set the tableViewcell's height with autolayout?

  1. List item

    I want to set dynamics tableViewcell'height on the storyboard,not use the code With autolayout.

  2. My English is poor.Thank you for answer this question. There are two labels on the tableViewCell's ContentView. The label's text is not limit length, and Label'height is dynamic, the height is change by the data of the model. I want to set the UITableViewcell height is equal to the bigger label's height.

Upvotes: 0

Views: 63

Answers (3)

highsun16
highsun16

Reputation: 301

In iOS 8, Apple introduces a new feature for UITableView known as Self Sizing Cells

I don't have enough reputation to put picture here, but the tutorial below might help http://www.appcoda.com/self-sizing-cells/

Upvotes: 1

Rohit Kumar
Rohit Kumar

Reputation: 887

I suspect you want to add constraints to cell..If yes then this is not possible...Although if you want to cell height then select your tableView and set rowHeight in storyboard also make sure your prototype cell is of same height.

Upvotes: 0

Shree
Shree

Reputation: 281

hope this helps you out...

In table view attribute Inspector make content as Dynamic Prototypes.

Upvotes: 0

Related Questions