【发布时间】:2017-04-23 06:12:38
【问题描述】:
有什么方法可以只重新加载 tableViewCell 但不让它重新加载 tableView 部分标题 View ?当我切换 UITableViewCell 我想更新数据重新加载更改
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch self[selectedIndex] {
case .tracks:
let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) as! TracksCell
return cell
case .playlists:
let cell = tableView.dequeueReusableCell(withIdentifier: cellPlayListId, for: indexPath) as! PlaylistCell
return cell
}
我想做的只是重新加载 UITableViewCell 我不想在下面重新加载这段代码
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {}
如果我使用 tableView.reload() 它会影响我在 viewForHeaderInSection 中的样式因为我添加了 UIViewScroll
感谢您的帮助!
【问题讨论】:
标签: ios swift uitableview