Detecting iPhone 5

iphone 5 sugartin xcode detect

Attempt to check if the current device is an iPhone 5 at runtime. The most advanced version of this I’ve found is from this answer on StackOverflow. The following is a slightly modified version of the macros created in the StackOverflow … Continue reading

Checking Current Device using macro

I use following macro. I place following macro in Application-Prefix.pch file.

Now, I can write anywhere in code as follows. One can directly write ‘UI_USER_INTERFACE_IDIOM’ but I prefer isIPAD as better option.