App CompatibilityThe iPad can run any app programmed for the iPad and the iPhone; however, the iPhone can only run apps specifically programmed for the iPhone -- it can't run apps designed for the iPad.
You can check if an app is universal by looking at the app's “download” button within the App Store. If the button contains a “+” within the top-left corner, then the app is universal. Within iTunes, the app's details page will also note that “this app is designed for both iPhone and iPad”.
I want to differentiate the controller for iPhone and iPad.
        #ifdef __IPHONE_NA
            {
            UINavigationBar *ipadNavBar = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 768.0f, 50.0f)];
            [[self view] addSubview: ipadNavBar];
            UINavigationItem *ipadNavItem = [[UINavigationItem alloc] initWithTitle: @"EMPLOYEE"];
            [ipadNavBar pushNavigationItem:ipadNavItem animated:NO];
            }
    else 
        {
        UINavigationBar *ipadNavBar = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 360.0f, 45.0f)];
        [[self view] addSubview: ipadNavBar];
UINavigationItem *ipadNavItem = [[UINavigationItem alloc] initWithTitle: @"EMPLOYEE"];
    [ipadNavBar pushNavigationItem:ipadNavItem animated:NO];
    }
if saying error unterminated #ifdef
Is this approach correct?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With