Joh*_* B. 2 xcode uitableview uistoryboard swift
我正在使用Xcode 7,我试图在故事板设置中设置UITableViewCell的高度,以便为不同的设备提供不同的单元格高度(例如,普通和紧凑x常规).
我找不到这些设置的地方.这只能通过编程方式实现吗?
并调整你的细胞行高度 -
viewDidLoadtableView.estimatedRowHeight = 100.0 // Adjust Primary table height
tableView.rowHeight = UITableViewAutomaticDimension //This line adjust cell height according to containts
Run Code Online (Sandbox Code Playgroud)
UITableViewAutomaticDimension到UITableView.automaticDimension tableView.estimatedRowHeight = 100.0 // Adjust Primary table height
tableView.rowHeight = UITableView.automaticDimension
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2823 次 |
| 最近记录: |