判断用户界面是ipad的还是phone的代码
- (void)applicationDidFinishLaunching:(UIApplication *)application{NSString *nibTitle = @"PadContent"; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){nibTitle = @"PhoneContent"; } [[NSBundle mainBundle] loadNibNamed:nibTitle owner:self options:nil]; [self.window addSubview:self.contentController.view];[window makeKeyAndVisible];}