gringoireDM / LNZTreeView

A swift TreeView
MIT License
235 stars 47 forks source link

indexPath.row always return 0 in cellForRowAt #26

Closed WayneSKK closed 5 years ago

WayneSKK commented 5 years ago

my data structure like the following root --- element A --- --- sub element A --- --- sub element B --- --- sub element C --- element B --- --- sub element A --- --- sub element B --- --- sub element C

however indexPath.row at root level always return 0, it works normally on sub element level, then I have same element at the beginning in all rows. The data display like below actually

root --- element A --- --- sub element A --- --- sub element B --- --- sub element C --- element A --- --- sub element A --- --- sub element B --- --- sub element C

I checked numberOfRowsInSection function are counting element correctly How can I solve this problem?

WayneSKK commented 5 years ago

I find out I missed the identifier for each element