Alright, I have a problem on my hands. I'm trying to convert my project to a universal app for the iPhone and the iPad. I'm trying to make iPad-specific versions of my XIB files. As it's not possible to Create iPad version using autoresizing masks in Xcode 5. My app just got crash when I create seperate xib for ipad like ViewController~ipad.xib and my Iphone ViewController is ViewController.xib.
1 Answers
0
votes
You need to load that specific XIB into memory through your ViewController. iphone specific files dont have that code. i have done in C# this way
static bool UserInterfaceIdiomIsPhone {
get { return UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone; }
}
public LoginController ()
: base (UserInterfaceIdiomIsPhone ? "LoginController_iPhone" : "LoginController_iPad", null)
{
}
You may have to convert this into Objective C or swift..but thats the idea..This has to be done in every controller