I’m using the following code to get the screen size width:
CGFloat width = [UIScreen mainScreen].bounds.size.width - 100;
But its giving width as “668.0” in portrait as well as landscape.
How can I get different width depending on the orientation of the device.
I ran into the same problem as you and all I could find is checking the orientation and calculate the height and width as follow:
These size are for the the iPad obvioulsy but it could work for iPhone with the right dimensions.
Personally I think it’s a bit poor but I couldn’t find anything else.