With help from one of my colleagues, I found a simple way of specifying a set of rules for iPad, and a separate set of rules for iPhone/iPod Touch. Apple recommends using user interface idioms, which might look something like this:
#ifdef UI_USER_INTERFACE_IDIOM()
#define IS_IPAD() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#else
#define IS_IPAD() (false)
#endif
usage:
if (IS_IPAD())
{
// foo
}
That’s all well and good, but upper-case code is a little bit scary to me, so I prefer this:
CGRect screenBounds = [[UIScreen mainScreen] bounds];
if (screenBounds.size.width == 320) {
// Some code for iPhones and iPod Touches
} else {
// Some code for iPads
}
Cool.
Exactly where is the facebook like button ?
Many thanks for spending some time to explain the terminlogy towards the learners!