Universal iPad/iPhone XIBs - Xcode 4

Sam picture Sam · Jun 7, 2011 · Viewed 7.2k times · Source

I want to make a universal app which has two different XIB files. One for iPhone, and one for iPad. They use the same code, just different UIs. How would I create a "universal" app?

Thanks.

Answer

ZYiOS picture ZYiOS · Mar 3, 2012

Just duplicate the xib file, then rename it to FileName~ipad.xib, add it to your project, iOS will automatically load the correct xib file refer to your device.