I have created a universal application using xcode 4.2 and iOS 5 SDK
.
Application runs fine when i run it for iPad but i am facing issue while running it for iPhone .
Code is in place to detect device idiom but still when i run application for iphone
it loads up xib for iPad and iarge screen appears on iphone .
Is this a bug for xcode 4.2
or am i missing some setting .Have tried setting all configuration from my side but to no help .
This is the code i have in my app delegate
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
LoginViewController *masterViewController = [[[LoginViewController alloc] initWithNibName:@"LoginViewController_iPhone" bundle:nil] autorelease];
self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
}
else {
LoginViewController *masterViewController = [[[LoginViewController alloc] initWithNibName:@"LoginViewController_iPad" bundle:nil] autorelease];
self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
}
I asked if this is a bug because it works perfectly fine on xcode 4.3 .