如何使3行全景如何UITableViewCell占据整个屏幕?

问题描述:

我加载从笔尖(厦门国际银行)细胞tableviewcell如何使3行全景如何UITableViewCell占据整个屏幕?

//tabelview cell register 

let nib: UINib = UINib(nibName: "ItemTableViewCell", bundle: nil) 

tableViewItemList.register(nib, forCellReuseIdentifier: "ItemTableViewCell") 

我已经花了很长的时间来解决这个问题,但我找不到任何解决办法。

我需要显示3行tableView,这三行必须占用我的屏幕。目前,它显示了三行,但还有一些额外的空白空间,我想要占据这些行。

1

以上是我所得到的屏幕。下面是我想要实现的设计。下面的UITableViewDelegate的功能

2

+0

请放多一点精力投入到你的问题。很难理解你的目标和你的问题。 – jjs

+0

感谢更新 –

+0

您将不得不在运行时找出表视图的大小(边界)(因为它对于不同大小的设备会有所不同),然后您必须相应地设置表视图单元格的高度。 – Gruntcakes

用途:

func tableView(tableView: UITableView, estimatedHeightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { 
    return tableView.frame.height/3 
} 

func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { 
    return tableView.frame.height/3 
} 
+0

当我添加导航第三数字行出屏幕。一点点 。你能帮我吗?我该怎么办? –