How can I get the width of an iOS device in pixels? I don't want to hardcode 320×480 or anything like that... I want to get the width dynamically.
How?
How can I get the width of an iOS device in pixels? I don't want to hardcode 320×480 or anything like that... I want to get the width dynamically.
How?
One way to get the screen size in pixels (not points) would be:
CGSize screenSize = [UIScreen mainScreen].currentMode.size;
This is easier than using other approaches involving getting the size in points, getting the scale, and doing some math on the two.