Is there any way to detect what device the user is using, then using that information, make the application use a specific nib
file?
Right now, the code that I have is
- (BOOL)application: (UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions{
if(isiPhone5){
self.RootViewController = @"RootViewController_iPhone5";
}
else{
self.RootViewController = @"RootViewController_iPhone4";
}
}
My other code for finding the device works and tells me what device the user is using, yet doesn't actually change the .xib file from RootViewController_iPhone4.xib
to RootViewController_iPhone5.xib
. Is there any way to do this?
I don't want to use auto layout, because I would like to have other custom things happen depending upon the device, such as different button names in the view controller if the device being used is an iPhone 4 verses an iPhone 5