ios - XCode universal App -


I have a universal iOS app for iPad and iPhone; I created a square with a xib and for that iPad. How do I design it for the iPhone now? Create another xib for iPhone? If so, how do I tell the app that when the need to load an XID for the iPhone when needed, because it loads the cover of the iPad and everything is absolutely big thanks in advance.

OK, your view controllers initWithNibName: bundle: do this:

  MyController * Controller = [[MyController alloc] initWithNibName: [NSString stringWithFormat: @ "myController _% @", device name] bundle: zero];   

Edit: You have to make 2 responsible, right? Give them names like settings_ iPhone.xib and Settings_iPad.xib when you want to display the settings screen, go ahead and declare

NSString * deviceName = ([[UID Device Current Device] User Interface IDOM] = = UIUserInterfaceIdiomPhone)? @ "IPad": @ "iPad"; After that:

  settings * controller = [[settings alloc] initWithNibName: [NSString stringWithFormat: @ "Settings _% @", device name ] Bundle: zero];    

Comments