Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    haha short and simpel, did the same :) thumps up for keeping overhead low! putting stuff in a macro isn't a challenge... Commented Oct 5, 2012 at 14:17
  • 2
    Well not putting things in macro or functions is prone not to be DRY... From the moment you need to do this check more than once... Commented Jan 13, 2013 at 22:26
  • Yup, but define macro as shown above, is more convenient and easy, u don't need to paste write this if... every time. Commented Mar 26, 2014 at 7:56
  • Thanks, You saved my life :D, But I don't know why Macro:#define IS_IPHONE_5 (IS_IPHONE && [[UIScreen mainScreen] bounds].size.height == 568.0) ==> Not working in simulator iOS 7.1, before that I still working on XCode 4.6. OMG iOS 7.1 & Xcode 5 Commented Apr 7, 2014 at 3:09
  • updated answer below to account for iPhone 6 and 6 plus screen sizes Commented Oct 20, 2014 at 12:58