Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pre = '';
- for(var i = 0, j = dataArray.length; i < j; i++) {
- if(dataArray[i].section != pre)
- //it's a header
- tableData[i] = Ti.UI.createTableViewSection({headerTitle:dataArray[i].section})
- pre = dataArray[i];
- //it's a row
- tableData[i].add(Ti.UI.createTableViewRow({title:dataArray[i].title}));
- }
- // this works for separating my rows and headers, but not grouping duplicate headers...
Add Comment
Please, Sign In to add comment