iPad crash or how to catch this
Hi, first of all Titanium is a wonderful software, thank You for it.
This shall be a small app for our customer, some kind of eBook, he wants just to swipe through pages.
So nothing really special about this, working perfectly in iPad simulator, but crashing after random swipe actions.
Somebody an idea ?
Thanks
Now shortly to my problem:
var scrollData = [];
for (i=0; i<=199; i++) {
var myV = Titanium.UI.createImageView({
top: 0,
height:fullSight,
width: 1024,
image: 'book/' + bigChapter[i] + '.jpg'
});
checkSpecialPage(i);
v.push(myV);
scrollData.push(v[i]);
}
var allChapters = v;
var view1 = Titanium.UI.createScrollableView({
views: scrollData,
backgroundColor:'#FFF',
showPagingControl:false,
pagingControlHeight:30,
maxZoomScale:2.0,
currentPage:0,
showVerticalScrollIndicator:false,
showHorizontalScrollIndicator:false
});
controllerWindow.add(view1);
1 Answer
-
I think it's a memory issue, you are creating way more views (199).
You might want consider creating the views "by request", or reuse them somehow.
Take a look at this:https://gist.github.com/810171