开发者

Scaling down Retina res icons to standard res

开发者 https://www.devze.com 2023-02-20 13:32 出处:网络
I have my ui for my app but I would like to work within interface builder for the ui. I only have a Retina scaled set (640 x 960). There are a lot of .png\'s but I don\'t know 开发者_运维百科what I sh

I have my ui for my app but I would like to work within interface builder for the ui. I only have a Retina scaled set (640 x 960). There are a lot of .png's but I don't know 开发者_运维百科what I should do to be able to implement both 320 x 480 scale ui and 640 x 960 scale ui. Is there a way to do something from within xcode or is there a way to scale down the images using preview or similar. If the only way would be to use a scaling program, then what should I scale them to? Thanks


You will love this little tool, free in the Mac Store

http://itunes.apple.com/au/app/unretiner/id411277085?mt=12

[EDIT]

It also sounds like you're not sure about how to implement both retina and normal interfaces.

You will need a pair of images for each "graphic object" and the retina version should have it's filename appended with @2x. So in the case of an image called "background.png" you will have one called "background@2x.png" for retina, and "background.png" for the older screens.

In your interface builder files you can simply choose the "background.png" version and the OS will pick up the retina version and apply it when needed.

The tool mentioned above will also save the "unretinized" files with the correct filename so if you use an image with the @2x appended, it will scale it down and rename it too!


You can use Preview to scale the images. Open the image, go into the Tools menu and select Adjust Size.... Change the Width (and height) to 50 percent and press OK.

Then use File/Save as... to save your new not-retina image.


I'm not an iPhone developer, but I believe the correct way to handle this would be to have two sets of icons: one for the iPhone 3GS and earlier and one for the iPhone 4. Scaling icons down will make them look muddy.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号