美文网首页
The separator line of previous c

The separator line of previous c

作者: TomatosX | 来源:发表于2016-09-20 22:22 被阅读131次

    Issue:

    The separator line of previous cell disappears when the cell expand and collapse.

    Reason:

    It seems like an iOS 7 bug.
    My project is based on iOS 8. The bug still exists.

    According to to this stackowerflow question:
    UITableView separator line disappears when selecting cells in iOS7

    I was able to fix it!

    We need add this lines:

    func treeView(treeView: RATreeView, didSelectRowForItem item: AnyObject) {
            treeView.deselectRowForItem(item, animated: true)
            treeView.reloadRowsForItems([item],
                                        withRowAnimation: RATreeViewRowAnimation(UInt32(UITableViewRowAnimation.None.rawValue)))
        }
    

    Fix method of iOS system tableview:

    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
            tableView.deselectRowAtIndexPath(indexPath, animated: true)
            tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation: .None)
        }
    

    相关文章

      网友评论

          本文标题:The separator line of previous c

          本文链接:https://www.haomeiwen.com/subject/bxgoettx.html