Force IOS Object Same Size On All Devices

126 Views Asked by At

This is a little bit of an odd request, but I'm trying to create an app that has animations that go between screens. The issue I'm having is that when I tell the devices to create a UIView 35 by 35, it is different sizes on the iPad and the iPhone.

CGRectMake(0, 100, 35, 35);

So, my goal is to create a UIView of the exact same size on all devices. I tried looking into scale, but both devices have a scale of 2 when I tested them.

[UIScreen mainScreen].scale

They only appear to be slightly different in size, so I'm not sure what I need to do. Any thoughts or ideas are much appreciated!

1

There are 1 best solutions below

0
On BEST ANSWER

Some old devices have regular display with 1х (like iPhone 3G), new devices have Retina displays (2x), and iPhone 6 plus has 3x retina display. And real pixel density (pixel per inch) is different (picture is from http://www.tekrevue.com/retina-display-comparison/): enter image description here

i.e. view with size 35x35 on iPhone4 and iPad with Retina Display will be different in inches.