objective c - How can I detect a simulated iOS device's screen size? -


how can detect simulated device's screen size , device name when app running in simulator? i'm simulating iphone 6 & 6 plus on ios 8. answers have tried return "simulator" device name, https://github.com/duhovny/devicehardware, , similar ones. thanks!

the following returns cgrect holding size of device's screen in points.

[[uiscreen mainscreen] bounds]; 

note following return size of screen without status bar. try think of frame rectangle application's window.

[[uiscreen mainscreen] applicationframe]; 

Comments

Popular posts from this blog

ruby - How do I merge two hashes into a hash of arrays? -

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -