SwiftKickMobile / TLIndexPathTools

TLIndexPathTools is a small set of classes that can greatly simplify your table and collection views.
tlindexpathtools.com
MIT License
347 stars 60 forks source link

Drawback in case of adding dynamic data from API in multilevel expandable tableview/accordion #78

Open RakeshImpinge opened 3 years ago

RakeshImpinge commented 3 years ago

Hello there!

I really found your library very helpful but I'm facing issues to pass dynamic data to the tableview sections, child items for expandable view as shown in example i.e. Outline

I checked that the code is being set according to static data for now. Is there any way to add dynamic data from API in form of JSON.

If I have an dynamic length of array, how can I specify the values is similar case as it is used for static data shown below:

TLIndexPathTreeItem *item1 = [self itemWithId:ITEM_1 level:0 children:childItems]; self.treeItems = @[item1, item2];

Any suggestions will be appreciated :) Thanks in advance!

wtmoose commented 3 years ago

Sorry for not responding to this sooner, but I was very busy with work. I’m not entirely sure I understand your issue, but it sounds like you need to build up your items array in a loop of some kind. I suggest that you post questions like this on StackOverflow. It is a better forum for getting help with basic programming questions like this.