ScrollableView insert view
Hi.
I know i can add a view to a ScrollableView but it is possible to insert a view?
In API i don't see any "insert" method so, i assume it can be done by maintaining an array with the views but i can't find a method to "update" the views in the ScrollableView.
Any tips?
Thank you
3 Answers
-
This will add a view at the end.
I know this :)What i want to do:
- i have 5 views for ex: v1, v2, v3, v4, v5 and i want to insert another view v31 between v3 and v4.
-
By any chance, have you found any resolution for this?
Thanks in advance
-
Try addView method, i think kitchensink has an example of it. "scroll_views_scrollable.js"
var newView = Ti.UI.createView({ backgroundColor:'purple' }); var l = Ti.UI.createLabel({ text:'View ' + (scrollView.views.length+1), color:'#fff', width:'auto', height:'auto' }); newView.add(l); scrollView.addView(newView);