我想删除 UITableView
中的单元格分隔符。这是我的模拟器目前的样子:
我在 View Controller 的 .swift
文件的 viewDidLoad:
方法中实现了以下代码行:
self.tableView.separatorStyle = UITableViewCellSeparatorStyle.None
虽然这似乎不起作用。
如何去除电池隔板?
这是我的 cellForRowAtIndexPath:
代码:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cellIdentifier = "Cell"
let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as! RestaurantsTableViewCell
// Configure the cell...
cell.nameLabel.text = restaurants[indexPath.row].name
cell.typeLabel.text = restaurants[indexPath.row].type
cell.mainImageView.image = UIImage(named: restaurants[indexPath.row].image)
return cell
}
最佳答案
关于ios - 如何删除 UITableView 中的单元格分隔符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34601934/