gringoireDM / LNZTreeView

A swift TreeView
MIT License
236 stars 47 forks source link

Out of range exception by dequeReusableCell by depthLevels >2 ? #6

Closed gagoarm closed 6 years ago

gagoarm commented 6 years ago

I have tested the demo version and Im having out of range exceptions on the cellForRowAt indexPath method.

When I open the levels and slide up/ down, by regenerating the cells I get the exception on the line where we are trying to get the specific node from the child's with the current index row.

Thanks for sharing this code!

gringoireDM commented 6 years ago

Hi, I will investigate on this one. sorry for the delay.

gringoireDM commented 6 years ago

This issue was due to a very poor choice of the nodes identifier.

The implementation in ViewController ws using as identifier position_depthLevel which was causing duplicates. In a wise implementation of node this issue will not occur. make sure that your identifiers are unique for each node of the tree. Pushing now a fixed master.

Since this affects exclusively the demo and not the library there will not be a new pod version.

Sorry for taking so long.