Hi,
I have a tableview and I need to add row(s) to it after it is added to a main view and then the last one added to the main window. See the example for a better understanding.
example:
var w = Titanium.UI.createWindow({...}); var v = Titanium.UI.createView({...}); var b1 = Titanium.UI.createButton({...}); v.add(b1); //if I add my elements and objects here, they are shown v.add(....); //if I add my elements and objects here, they are shown v.show(); w.animate({ view: v, transition: SOME_TRANSITION_CONSTANT }); //the 2 calls above show the main view (v) //now if I try the following : var tv = Titanium.UI.createTableView({...}); v.add(tv); //and then : var row = createTableViewRow({...}); tv.add(row); //neither the tableview nor the row are shown.I guess all this has something to do with how zIndex has been implemented in the SDK even though it hasn't been used.
I must say that I have multiple views like the "v" one. When a view is animated into the window the previous isn't removed or anything. So it could be some problem with views piling up.
Anyone has any idea what might be causing this?
1 Answer
use tv.appendRow(row);. this way you can add rows to your tableView whenever you want :)
Your Answer
Think you can help? Login to answer this question!