Screenresolution on iPad and iPad Retina - ios

I have made a Windows program, which I want to translate to an iPad app. The graphics in my Windows program is made to a screen with a resolution of 1024 x 768 px, which is perfect for the old iPads.
What happens if I use the same Graphics on a iPad Retina ? Will the graphics only be shown in part of the screen ?

If you haven't used vector graphics then you're images will look blurry on retina devices. So you need to make new graphics 2 times the size of your originals to make it look crisp.

Related

Correct image size for iPhone developing

I am working on an iPhone game in spritekit, for the past while I have been using random graphics but as my game play is beginning to shape up. I think it's time I look into my own graphics development.
My level is designed in Tiled, So I would like to know if it is ok to make each tile 16 * 16 and the hd version ( for the iPhone retina) 32 * 32.
and, what is the difference in drawing images for iPhone and iPhone retina.
Thank you
That's correct. Retina graphics twice the resolution of non-retina. The easiest way to support both retina and non-retina displays is to make two copies of each graphic you use. Use the format imagename.png for the non-retina and imagename#2x.png for the retina image. When you want to load the image you can use this line:
UIImage* image = [UIImage imageNamed:#"imagename"];
iOS will automatically select the correct image.

Screen resolution iOS Devices and graphics

Heyho,
Each iOS device has a different screen resolution and pixel density.
Why do I need to support non-retina and retina graphics only and dont make graphics for each different screensize (e.g. 4 graphics each for a iPad App)? How does Xcode adjusts graphics to these screens?
EDIT
Our designer says she has to make 4 graphics for each device (due to density and screensizes) and I need to explain to here, why a retina and a non-retina graphic are enough.
All iPad devices have a screen dimension of 1024x768 points (not pixels).
Retina devices have a scaling factor of 2, so you will need to create two sets of graphics, one for non-retina and one for retina; the difference being that the retina images are twice the size in each dimension (i.e. 4 times bigger overall).
So you don't need to worry about each iPad model; simply that it's retina or not.

How to set screen resolution in IOS 7?

I build and run my old iPad app for IOS 7.
The screen resolution is twice as it was.
I don't want to re write the code to position the controls
There is no storyboard. Everything is in code
Can I have the same resolution in IOS 7 as it was before?
The screen coordinates are still the same, the coordinates are in floating point.
The screen resolution is 2048 x 1536 but if you get the CGRect frame for the entire screen it is is still 1024x768, as GGRect is floating point.
I don't really understand your problem. You shouldn't have any issue with de position of all element because there is no change in the coordinate system.
The thing you need to do is design image with retina size. For exemple if you had an image 2x2 you need the same image with the same proportion but in 4x4.
It sounds like you might be running an iPhone app on the iPad. On the new iPads the iPhone Apps run in 2x mode automatically on iOS 7 using the retina assets.

iOS frame and dimensions

I've searched a lot but find nothing about frame and dimension. I thought this should be a big topic.
Anyway, when create a view using frame, the whole screen size is 320*460 (320*480), but the dimensions of screen is 720*960. Can someone explain this? How to convert them.
This is only for 3.5 inch non-retina device.
EDIT:
I figured it out. The problem is because the size of iPad and iPhone is different. For iPhone, the dimension is 4:3, but for iPad, the dimension is 1.33.
Check out:
http://www.idev101.com/code/User_Interface/sizes.html
Points are how the screen is measured by apps so if you place something at a position you place it at a point. There are two pixels per point on retina devices.
This is only for 3.5 inch non-retina device.
No, this is the point. 3.5 inch retina devices have a resolution of 640*960.
For development Apple convert this resolution to the old 320*480 dimensions. Why ? To develop the same way for retina and non-retina devices. Except that you have to provide retina image. For a classic 100x100 image named myImage.png you have to provide a 200x200 image named myImage#2x.png. But all the development except that is the same. There are 4 times more pixels per point (ppp) on retina devices than on old iOS devices but it's transparent for the developers.
For the 320*480 vs 320*460 point : this is the status bar. In iOS < 7.0 status bar took 20 pixels height. You always should trust the [UIScreen mainScreen].applicationFrame.size to get the application size within the phone.
Update : you talk about uiimagepickercontroller don't mistake pictures taken from the camera (or from the web) with the screen resolution !

My Views are only 320px across and I get poor resolution images on iPhone 5?

I have a big problem that is causing all sorts of complications. I want to make native-resolution graphics for my iPhone 5 app using the 326ppi Retina Display quality graphics. However, all of my Views seem to be defaulting at 320px width! So the only option I've been able to find is to make my graphics much larger, and then use the 'redraw' graphics option to make the graphics look somewhat nice.
However, I would much rather just use pixel-for-pixel native resolution images. What can I do to get xcode to show my views with retina display resolutions? I am using the latest xcode and programming for iOS 6.1
Thanks!
In UIKit views are measured in points:
(CGSize){width, height}
. . where width and height are measured in points. On an iPhone 3GS (normal display), this gives the following widths:
(CGSize){320, 480} //screen resolution is 320x480
On an iPhone 4:
(CGSize){320, 480} //screen resolution is 640x960
. . ie - exactly the same. To draw a pixel at position {1,1} on an iPhone 4, the point would be:
(CGPoint}{0.5, 0.5}
Since the resolution on a retina display is exactly double, it makes drawing very easy between devices. UIKit will work out what pixel to set, given the hardware, when you supply floating point numbers. (Similar to the way OpenGL works). . . . it gets a little more complicated when supported 3.5 vs 4 inch screens.
For image assets, just name the resources as follows:
myResource.png - regular
myResource#2x.png - retina display
myResource-568#2x.png - retina display, especially for 4 inch screen. (Eg backgrounds, etc).

Resources