Details
Description
Currently there’s no way to add views at a specific index of the children list.
The only way to do this is something along the lines:
function insertAt(parent, views, position) { |
// this one is slow… |
var children = Array.prototype.slice.call(parent.children); |
// this one is slowish too… |
parent.removeAllChildren();
|
// and this one is very slow on android… |
parent.add((
|
children.slice(0, position)
|
).concat(
|
views
|
).concat(
|
children.slice(position)
|
)
|
);
|
}
|
…which you already know will flash with no content for a small (yet sensible) time.
Attachments
Issue Links
- duplicates
-
TIDOC-2282 Documentation for insertAt and replaceAt is missing
-
- Closed
-
- relates to
-
TIDOC-2282 Documentation for insertAt and replaceAt is missing
-
- Closed
-
-
TIMOB-19355 Windows Parity: Ti.UI.View.insertAt and replaceAt not working
-
- Closed
-