Sunday, April 10, 2011

Detecting screen size of iOS devices programmatically

Today i needed to write some code that will run on iPhone/iPhone4/iPad.
To go well with such fragmentation you must make some Interface elements change position dynamically based on the device screen size.

To get the screen size you do the following:

That's it!
Hoping it is a useful piece of info

Bassem Elhawary

1 comment: