NSINdexPath as treeview index
c I'm building some sorft of treeview on iOS开发者_运维百科. It should basically contain simple items/objects and their positions. I thought I could use NSMutableDictionary where NSIntexPaths would be keys. Is that sound idea? Would it make me worth while when navigating through tree?
I wouldn't recommend it as your tree would never be sorted. Reconstructing the tree or iterating along the branches would be very slow.
iOS doesn't have NSTreeNode, but you can use that as a model and try to reimplement that on your own (it's not too hard).
精彩评论