objective c - #if for device detection in iPhone SDK -


i'm curious why code won't work:

#if ui_user_interface_idiom//() == uiuserinterfaceidiompad @implementation uinavigationbar (custom height)  - (cgsize)sizethatfits:(cgsize)size {     cgsize newsize = cgsizemake(self.frame.size.width,44+breadcrumbbarheight-1);     return newsize; }      @end #endif 

any ideas?

ui_user_interface_idiom() macro designed (and defined) runtime evaluation! using compile-time evaluation fail.

it defined as:

#define ui_user_interface_idiom() ([[uidevice currentdevice] respondstoselector:@selector(userinterfaceidiom)] ? [[uidevice currentdevice] userinterfaceidiom] : uiuserinterfaceidiomphone) 

the call [uidevice.. fail @ compile-time evaluation


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -