Here is my didFinishLaunchingWithOptions:
Currently my app is only for iPhone but i want this in both(universal).
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
playerScreenViewController *playerScreen=[[playerScreenViewController alloc] initWithNibName:@"playerScreenViewController" bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:playerScreen];
self.window.rootViewController = navigationController;
[[UIApplication sharedApplication] setStatusBarHidden:YES];
self.window.backgroundColor = [UIColor grayColor];
[self.window makeKeyAndVisible];
return YES;
}
And I don't know how to use this condition in appdelegate:
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
// iPad
} else {
// iPhone
}