The separator line of previous cell disappears — RATreeView


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 cell disappears — RATreeView)