Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tableview Cell size not changing? Swift

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?

Images : enter image description here enter image description here

Constraints : enter image description here

Output : enter image description here

like image 394
Syed Ariff Avatar asked Nov 29 '22 14:11

Syed Ariff


2 Answers

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:

UITableView's Size Inspector page

like image 160
Kádi Avatar answered Dec 15 '22 15:12

Kádi


You can set custom row height example add ;

func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat 
{
    return 100.0;//Your custom row height
}
like image 29
SwiftDeveloper Avatar answered Dec 15 '22 16:12

SwiftDeveloper