初めてのロードテーブルビューではうまく見えますが、テーブルビューのスクロールまたはテーブルビューのスローアップのときに問題があります。lineView
ポジションの変更。テーブルのスクロールまたはリロード後の位置の変更
func drowLine(_ cell: UITableViewCell)->UIView{
let lineView = UIView(frame: CGRect(x: 20, y: cell.contentView.frame.size.height - 1.0, width: cell.contentView.frame.size.width - 40 , height: 1))
lineView.backgroundColor = UIColor(red: 56/255, green: 66/255, blue: 72/255, alpha: 0.149)
return lineView
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: titleDisclosureIndicatorID, for: indexPath) as! TitleDisclosureIndicatorCell
//......
cell.contentView.addSubview(drowLine(cell))
return cell
}
class TitleDisclosureIndicatorCell: BaseTableViewCell {
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: .value1, reuseIdentifier: reuseIdentifier)
}
//.....
}
初期荷重テーブルビュー:
スクロールした後、行のいくつかの変更テーブルビューライン位置をリロード:
どのように変更されますか? –
@MilanNosáľ画像が –