I need some help to understand what is the best way to load multiple UI objects to my window in titanium javascript.
For example if I need to load 50 views into my window the fastest way possible.
At the momento I'm using a for loop but I takes to long and the app seams to freeze while my for loop is executing.
Edit:
for each person I need to create a blue line and then I need to create a line for each medicine that this person needs to take. the problem is that I have over 30 persons, if each person takes 5 medicines that gives 150 lines plus 30 blue lines. and to create the layout it takes to long to execute.
This can be easily achieved using the Ti.UI.ListView component.
a listview is composed of sections, each section hold what is called items, and also each section can take optional header & footer.
please check the docs for examples.
what you'll end up doing is for each person you'll create a section, the person's information would go in the header of each section (the header will hold labels to display the persons name & other infos), and the medicines will go in the items of each section (i.e person).