I’m curious why this 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() is a macro designed (and defined) for runtime evaluation!
Using it for compile-time evaluation will fail.
It is defined as:
the call [UIDevice.. will FAIL at compile-time evaluation