iPad / iPhone Incompatibility

I’ve have a simple slide-show app which works fine for the iPhone and the iPad - the images are very letterbox.

When I change the images by even 5% in size to make them less letterbox it still works on the iPhone but fails to start on the iPad.

No code changes at all - only small image resize (34 images).

Interestingly, it seems to work ok if there are about 26 images, but after that it breaks down.

Have tried playing with zoomeven, zoomstretch and none but the iPad just isn’t interested.

Have also tried building for iPhone/iPad Universal, and for individual devices but it still won’t work on the iPad.

Grateful for any ideas on where to look next.

[import]uid: 13440 topic_id: 7791 reply_id: 307791[/import]

We don’t know what you did, post some code.
No code changes at all
That’s nice and all, but we don’t know what it was in the first place.

Now that said, I have one suspicion based on this clue:
it seems to work ok if there are about 26 images, but after that it breaks down.

The iPhone 4 has more memory than iPad, so perhaps that’s why your code is failing:
http://www.wired.com/gadgetlab/2010/06/iphone-4-ram/

Obviously this would only apply if you’re using an iPhone 4 but you didn’t specify.

The mistake you could be making is to load all your images ahead of time, but again without your code we have no idea what you did. For a slide viewer there’s no need to load all the images ahead of time; simply load them right before they come into view, and remove them as soon as they slide out of view. [import]uid: 12108 topic_id: 7791 reply_id: 27648[/import]

@jhocking

Thanks - yes am preloading - works on iPhone 3. The reason I’m confused is that it works if the 34 images are letterbox (Nook format 250.8 x 125.4 mm) but if I make the images just a bit bigger to work on the iPad it crashes.

Code below - in the mean time I’ll try to not pre-load.

Am a total beginner so thanks in advance for any help.

[code]
local function loadImages(i)
local p = display.newImage(i…".jpg");
p:setReferencePoint(display.CenterReferencePoint)
local h = viewableScreenH-(top+bottom)

if p.width > viewableScreenW or p.height > h then
if p.width/viewableScreenW > p.height/h then
p.xScale = viewableScreenW/p.width
p.yScale = viewableScreenW/p.width
else
p.xScale = h/p.height
p.yScale = h/p.height
end
end

if (imgNum > 1) then
p.x = screenW * 2.0
else
p.x = screenW * 0.5
end

p.y = h * 0.5

images[i] = p;
imgNum = imgNum + 1;
end

local function bakgroundLoad(np)
for i = 1, np do
print ("LOADING " … tostring(i));
loadImages(i);
end
end
[/code] [import]uid: 13440 topic_id: 7791 reply_id: 27658[/import]