Voglio differenziare il controller per iPhone e iPad.Come differenziare iPhone e iPad nell'applicazione universale?
#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];
}
se dicendo errore #ifdef terminato
È questo approccio corretto?
grazie Crazy Chimp! – user905582
nessun problema - felice di poterti aiutare! –
L'app deve essere universale per il blocco di iPad da eseguire. –