2011-11-17 99 views

回答

1

使用不同的.xib文件。確定是否使用這個或這個塊使用

NSString *nibName = nil; 
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { 
    nibName = @"CustomViewControllerIpad"; 
} 
else { 
    nibName = @"CustomViewControllerIphone"; 
} 

CustomViewController *viewController = [[CustomViewController alloc] initWithNibName:nibName bundle[NSBundle mainBundle]]; 

[self.navigationController pushViewController:viewController animated:YES]; 
[viewController release]; 
相關問題