ScrollableView limit on iPad
Hi,
today i tried to create a ScrollableView with 24 images (1024x768) on iPad but after scrolling to view number 19 the app crash on Device (on emulator work fine)
Is a limit of ipad? A bug of ScrollableView?
I tried to use 56 View with a label inside, and i can't go to the last slide.
I use Titanium SDK 1.3.0 (same results with 1.3.2)
This is the code.
Thanks.
.g
var slideViews[];
for (var i=0; i<56;i++) {
slideViews[i] = Ti.UI.createView( {
top: 0, left: 0,
width: 1024,
height: 768,
backgroundColor: '#CC0000',
});
slideViews[i].add( Ti.UI.createLabel({text: "Label "+ i}) )
}
var sv = Ti.UI.createScrollableView(
{
backgroundColor: '#0F0',
left: 0,
top: 0,
width: 1024,
height: 768,
views: slideViews
});
4 Answers
-
I use a ScrollableView like you but instead of Views i load WebViews (with local html files). I have the limit in 80 files and it doesn't crash. This is how i do (you could try replacing weview for views):
var scrollable_view = Ti.UI.createScrollableView({ views:[], backgroundColor: '#545454', showPagingControl: false, currentPage: 0 }); for (var c=0; c<80; c++) { var webview = Ti.UI.createWebView({ url: 'html/page_'+c+'.html', backgroundColor: '#fff', visible: true, top: 0.5 }); scrollable_view.addView(webview); };
Good luck !!
-
Same here,
I have a gallery with scrollableview from remote images, and it crashed horribly. Sometimes the images overlap, on top of each others then crash. It's more evident with larges set of images, probably memory issues? Same line of code ran perfect smoothly on iPhone iSO4 4.0, but compiled on a dedicated ipad app, which runs 3.2 on 1.3.2 Ti SDK seems to crash.I just tried 1.3.3, much stabler now with no images overlapped but still crash if i were to load a few galleries, so again, memory leak?
I will try webview method like Ivan suggested later.
-
It could be that we have an issue with ScrollableView and large image sets on iPad - would you mind zipping up and sharing your resources directory? To keep it private, you could send to kwhinnery at appcelerator dot com.
-
Still the same problem with the scroll view with SDK 1.4.0 …. hoped that it would be fixed with 1.4.0 =/