【发布时间】:2016-10-23 22:22:55
【问题描述】:
我有一个 tableView UI,我想在 TableViewCell 内的某个字段下方创建一条小水平线,例如它的外观,我想在 Location: Atlanta, GA 正下方制作水平线。这就是主情节提要的样子。我只想在原型单元格的位置字段下方创建一条细灰色水平线。任何建议都会很棒。我找到了一种创建线条的方法,但它本质上是在 TableCell 的末尾创建一个边框,这不是我需要的。
我的 TableView 代码如下
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let mycell = self.StreamsTableView.dequeueReusableCell(withIdentifier: "prototype1", for: indexPath) as! HomePage_TableViewCell
return mycell
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
tableView.backgroundColor = UIColor.clear
return names.count
}
【问题讨论】:
标签: swift uitableview swift3