I have a universal iOS app for iPad and iPhone. I created a class with a xib and its for the iPad. How do I design it for the iPhone now? Create another xib for iPhone? If so, how and where do I tell the app to load the xib for the iPhone when needed, because right now it loads the iPad xib and everything is too big of course.
Thanks in advance
I have a universal iOS app for iPad and iPhone. I created a class
Share
Well , your view controllers have a method called
initWithNibName: bundle:.Do this:
EDIT:You have to make 2 xibs , right? Name them something like Settings_iPhone.xib and Settings_iPad.xib. When you want to show the Settings screen , go ahead and declare
NSString *deviceName = ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) ? @"iPhone" : @"iPad";After that :