Window.remove does not work?
Hi everyone,
Is it possible to remove an ImageView from a Window using the window's remove method? I have something like this:
var window = Titanium.UI.createWindow();
var image = Titanium.UI.createImageView({url: myUrl});
window.add(splashNoText);
window.open();
// Some more code here, and then...
window.remove(image);
The final line appears to have no effect, have I misunderstood the purpose of 'remove'?
Thanks,
Toby
2 Answers
-
Ah, it does work and I am a fool - some code I omitted from my example was at fault!
-
For other newbies out there like myself, if you create and open (or pop) up a window, then attach multiple views, the easiest way to quickly remove views is to just close the window entirely! ie window.close()