【发布时间】:2014-08-19 16:12:33
【问题描述】:
我在 swift 应用程序中使用 UITableView,并使用我自己的自定义 UITableViewCell。
当试图隐藏 UITableView 中的空单元格时,它仍然具有白色背景。
在 UITableView 下我有一个背景图片 (UImageView)。
我已经尝试隐藏这些单元格,实际上它们是隐藏的,但我仍然有白色背景,使用以下代码:
override func viewDidLoad() {
super.viewDidLoad()
var tblView = UIView(frame: CGRect(x: 0,y: 0,width: 0,height: 0))
tblView.backgroundColor = UIColor.clearColor()
tableView.tableFooterView = tblView
var nipName=UINib(nibName: "CustomCell", bundle:nil)
self.tableView.registerNib(nipName, forCellReuseIdentifier: "CustomCell")
}
【问题讨论】:
标签: ios iphone uitableview swift