Reputation: 732
I dragged an dropped a table view Controller from the object library and changed the cell's row height to 300.However , when I run it in the simulator , the cell remains the same standard size.Why is this?
Upvotes: 4
Views: 10174
Reputation: 968
Make sure you have given all the constraints in the cell . They have to be connected from top to bottom.
Make sure that the class of content view inside the custom cell is UIView .(I have done the same mistake )
press content view -> see identity inspector on right -> class should be UI view .
Upvotes: 1
Reputation: 7370
You can set custom row height example add ;
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat
{
return 100.0;//Your custom row height
}
Upvotes: 3
Reputation: 2906
In Storyboard, if you know the cell height, set the Table View's Row Height property on the Size Inspector tab, not the cell's:
Upvotes: 21
Reputation: 4179
Use the delegate of the tableview and set the heightforrowatindexpath method.
Upvotes: 0