Вопрос

I have an app that I'm testing on my macbook that generates images. They are fairly low resolution. Is there a way to make the images of a higher resolution, or do I have to go to the iPad to generate there? I have the following code that I was hoping would do the trick, but it didn't seem to do anything :

self.imageView.contentScaleFactor = 2.0;

Thanks in advance!

Это было полезно?

Решение

When doing screen snapshots, make sure the simulator's "Hardware" - "Device" settings is for a retina device. Then either the simulator's "File" - "Save Screen Shot" or doing it programmatically will yield a retina-resolution image (regardless of the setting for "Window" - "Scale" in the simulator). Just make sure you've configured the simulator to simulate "Retina" hardware.

When you generate these retina-quality images, though, you don't have the appearance of the physical device (which is nice to have when going to print). If you want the appearance of the physical device, you can marry these screen snapshots with the "Apple Product Images" on the Marketing Resources page (you need Photoshop to do this).

Ultimately, though, you're limited to the resolution of the digital assets in your app. For example, if you don't have retina-quality digital assets (e.g. only 320x480 resolution images), then it will look horribly pixelated when you print it.

And even full retina resolution screen snapshots will look a little pixelated when you print. If you scale your 640px wide screen snapshot in print, if it's much more than 2-3 inches wide when you print, you'll start to notice the pixelation and there's not a lot you can do about that (without cheating in Photoshop and replacing images with higher resolution assets).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top