How to set screen resolution in IOS 7? - ios

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.

Related

Xcode - View Screen size

I am in the process of learning iOS development with XCode. I created a project to implement some of the things I've been learning and to begin learning how to manage image sizes and placement on different sized screens i.e. iPhone 8, iPhone 8+, iPad, etc. I am currently using XCode 10 Beta and I noticed that the View size on the main storyboard is half the actual screen size of any device I select to to View As:. For instance if I select View As: iPhone 8 the screen size is 375x667 instead of being 750x1334 like the actual device. I discovered this because I created a square image of 100x100px and thought I would be able to line up 7 across the screen. To my surprise the images took up twice as much screen as I had calculated.
Can anyone let me know why the screen Views in XCode are half that of actual screen size?
Do I just always assume to make my graphics half the size I would actually want them?
Edit: Here's a screenshot of what I am referring to in XCode
When I click on the empty view in the the XCode storyboard pane this is this resolution it displays for the view. Also, when I export my graphics from Illustrator the are exported with the #1x, #2x, and #3x variants. However, when I place an image in the view that is 100x100px it takes up about 1/3 of the screen instead of 1/7 of the screen as I would expect on a iPhone 8 which has a resolution of 750x1334.
Edit #2: So after playing around more with XCode I do see that the resolution for the views are in Points not pixels however, in this screenshot for a iPhone 8+ View:
I would assume with a screen resolution of 1080x1920 #3x the Point resolution would be 360x640 for an iPhone 8+ not 414x736.
It has to do with the difference between points and pixels. On the original iPhone when it was release it was 1 point per pixel but as resolution got better it became 2x pixels per point (4 pixels). Now the resolution is 3x pixels per point on some of the newer devices (9 pixels).
https://www.google.com/amp/s/blog.fluidui.com/designing-for-mobile-101-pixels-points-and-resolutions/amp/

Why would you use native iphone 6 resolution in xcode when building your app?

As of yesterday I had an app using mostly static sizes to fit an iphone 5 screen (320 points width). It was working fine in iphone 6 as well thanks to the system scaling up automatically.
Then I decided to add a retina hd launch image and everything became a lot smaller on iphone 6. So I decided to modify my whole application to use dynamic sizes and fonts so that it would fit the two iphone types the same way. And now it is working quite good.
But after these few hours of extra work, I keep asking myself the same question... what was the point? Why would you want to use dynamic sizes that fit both iphones when you can make it work for iphone 5 and let the system scale up automatically?
the use is: more screen estate. You can fit more on the screen.. at the least images or maps could be bigger while buttons retain there size -- they normally don't need to be bigger :) same for the keyboard.
you don't just get everything scaled but you can decide what is scaled and what isnt

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 !

Xcode iPad resolution in landscape mode

I`m new at iOS development. I have seen that the new iPad 3 have an 1536x2048 resolution. And I asked from my designer that all the design should be in that resolution, but now i see that i have to resize every image, button and background to fit xcodes story board. How in xcode i can set the development resolution to 1536*2048?
You don't. Xcode uses points to reference pixels and automatically uses the correct graphics depending on the device. You have to make two copies of your image, "image" and "image#2x".
You do all of your development with "image" and iOS will automatically use the #2x version if the device is retina.
Your HD images should have #2x suffix. See "Specifying High-Resolution Images in iOS" section of Resource Programming Guide,
1536x2048 is the resolution of the screen (in pixel) but in xcode you are working with points. So ipad3 has still 1024x786 points (the same as in ipad2) but you can go to the point 0.5 for example.

IPad simulator's screen resolution

I designed my first ipad app.
And when i run it on the simulator resolution is really small. Smaller than really ipad's resolution. Right now i have not ipad, and cant test app on it.
What the problem with resolution?
UPD I connect big display to my macbook. But resolution is still small. I think thats because macbook's display is primary and big monitor is the second. How can i change it?
The problem is that the physical resolution of your screen is lower than the physical resolution of the iPad’s screen. For example my iMac’s screen has 1920 pixels per ~19 inches of width, or roughly 100 pixels per inch. The iPad’s screen density is about 130 ppi, one third higher. If you’re serious about your app, you have to test on the real device anyway. (By the way, if you are simply talking about the window size, that can be changed in the Window menu or using ⌘1–⌘3 shortcuts.)

Resources