Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

stretching images that were uploaded from bundle in ios 4.3 and below #12

Open
ItayDag opened this issue Apr 30, 2012 · 2 comments
Open

Comments

@ItayDag
Copy link

ItayDag commented Apr 30, 2012

Hi
When I import the images directly to the thrid-party project and try to stretch it using "stretchableImageWithLeftCapWidth"
all is good.

but when I am trying to get the image from the bundle we created in the guide - it looks corrupted.

  • I am sure the stretching is right cause it works when I dont use the bundle.

This happens only on stretching ...
is it possible that somehow the image is uploaded wrong.
Note: it happens only on ios 4.X and in ios 5 it looks good.

Any ideas ?

Best regards

@jverkoey
Copy link
Owner

jverkoey commented May 3, 2012

Is this still an issue?

@ItayDag
Copy link
Author

ItayDag commented May 5, 2012

unfortunately its still is,
The only work around I found (which you cant exactly call a work around ) is not using the .bundle and to import a folder with my resources directly to the third-party project with my own global prefix to all the resources. (Well its much more nicer to use a .bundle I agree - but I am starting to think since you are not really hiding your resources from your users, why shouldn't you just upload it as a folder ? )

When I did it this way it worked good and all images were stretched as they should.

So to conclude :

  1. When I used the ".bundle" as you wrote in the guide I needed to change all the resources's names that had postfix of "...@2x.png" to "....png" caused it didn't found them in the bundle otherwise
  2. After removing all @2x postfix all most images were shown badly on the device (was mostly seen when using stretching but not only )

I was reading that when loading high res images in ios4 it is automatically look for a resource with @2x postfix in its name, this way you can support the old 3Gs devices (holding 2 sets of images)
Maybe when loading from bundle which is not the main bundle somehow skip this system stage of recognizing the @2x
name.
I will keep working on it and tell you if I came up with something,

You really helped me with this guide and I would love if you can tell me how can I contribute to your work (if I can)

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants