1个viewController怎么关联2个XIB,一个是iph
2016-10-15 本文已影响24人
PengPengPro
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
YourViewController *vc = [[[YourViewController alloc]
initWithNibName:@"YourViewController_iPhone" bundle:nil] autorelease];
} else {
YourViewController *vc = [[[YourViewController alloc] initWithNibName:@"YourViewController_iPad"
bundle:nil] autorelease];
}