BOOL isPad = [[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPad;
if (isPad) {
} else {
}
読み込むnibファイルを切り替えたり
NSString *nibName = [[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPad ? @"viewController_iPad" : @"viewController_iPhone";
UIViewController *viewController = [[UIViewController alloc]initWithNibName:nibName bundle:nil];
0 件のコメント:
コメントを投稿