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];
}
上一篇 下一篇

猜你喜欢

热点阅读