How to convert XIB from iPhone to iPad?

Problem: you want to convert XIB from iPhone to iPad.

Solution: the simplest way is to copy original XIB to a new name, for example with ~ipad at the end. Import it to your project in Xcode. Right click on it select „Open As” and choose „Source Code”. Then follow these steps:

  1. Replace „com.apple.InterfaceBuilder3.CocoaTouch.XIB” with „com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB”.
  2. Replace „IBCocoaTouchFramework” with „IBIPadFramework”.

After that, right click on the file again and choose „Open As” > „Interface Builder – iOS”.

Komentowanie jest zakończone.