[AC-2391] iOS: Slow and poor performance for ScrollableView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2013-10-01T14:44:51.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | ScrollableView, delay, ios, slow |
| Reporter | Sameeh Harfoush |
| Assignee | Mauro Parra-Miranda |
| Created | 2013-09-30T15:17:45.000+0000 |
| Updated | 2016-03-08T07:41:25.000+0000 |
Description
i ran the below code on both devices running android and iOS 6.1
ScrollableView scrolling is smooth on android, unlike iOS which hangs and sometimes freezes. see below code.
note that i am using iOS SDK 7.0 when compiling.
Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
backgroundColor : 'white',
exitOnClose : true,
fullscreen : false
});
function getSetOfViews() {
var cView = Ti.UI.createView({
width : Ti.UI.SIZE,
height : Ti.UI.SIZE,
layout : 'horizontal'
});
for (var i = 0, j = 5; i < j; i++) {
var boxView = Ti.UI.createView({
width : 25,
height : 25,
backgroundColor : 'red'
});
cView.add(boxView);
};
return cView;
}
function generatePage() {
var page = Ti.UI.createView({
width : Ti.UI.FILL,
height : Ti.UI.FILL,
layout : 'vertical'
});
for (var i = 0, j = 15; i < j; i++) {
page.add(getSetOfViews());
};
return page;
}
var pageViews = [];
for (var i = 0, j = 10; i < j; i++) {
pageViews.push(generatePage());
};
var scrollabkeView = Ti.UI.createScrollableView({
views : pageViews,
backgroundColor : 'white',
showPagingControl : true,
cacheSize : 10
});
win.add(scrollabkeView);
win.open();
Resolving as a duplicate. No need to open a new ticket in the future--just add your notes onto the original ticket.
sorry Ingo, i saw the other ticket after posting this one. thanks
DUP of TIMOB-15095