UITableViewCell Separator disappearing in iOS7

前端 未结 30 734
轮回少年
轮回少年 2020-12-07 08:31

I have some strange issue with UITableView only in iOS 7.

UITableViewCellSeparator disappears above the first row and below the last row. S

30条回答
  •  不思量自难忘°
    2020-12-07 09:11

    I've resolved putting these lines of code where the update of the tableview hapens:

    self.tableView.separatorStyle = UITableViewCellSeparatorStyle.None;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine;
    

    For example, in my case i've putted them here:

    tableView.beginUpdates()
    tableView.insertRowsAtIndexPaths(insertIndexPaths, withRowAnimation: UITableViewRowAnimation.Fade)
    tableView.endUpdates()
    self.tableView.separatorStyle = UITableViewCellSeparatorStyle.None;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine;
    

提交回复
热议问题