Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting iPhone xib to iPad xib?

How do you do it? I saw one video tutorial on it, but the screen was too small. Also, other than changing the view size, are there any other major changes I would have to make to my iphone apps to convert to iPad?

like image 756
NextRev Avatar asked Mar 21 '10 18:03

NextRev


People also ask

What is XIB file in IOS?

What are XIB files? From the point of view of the UI designer, XIB files contain the views or windows that you design in Interface Builder – the controls, their layout and properties, and their connections to your code. It is important to understand that on a technical level, XIB files are stored object graphs.

What does XIB mean in Xcode?

"xib" stands for Xml Interface Builder.


1 Answers

I was able to narrow it down to a few things, so here are the steps that worked for me:

1) Make a copy of the iPhone xib file and add it to your project

2) Right click the file (in xcode) and Open As > Source Code

3) The 2nd line should look like:

<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> 

Replace with:

<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10"> 

4) Search for "IBCocoaTouchFramework" and Replace all occurrences with "IBIPadFramework"

5) Save the file and Open As > Interface Builder - iOS

The file might still look like a regular iPhone xib, but for me, once I changed the Status Bar to "Black" in the Attributes inspector the rest of the xib just kind of "snapped" into an iPad xib

like image 50
Jag Avatar answered Oct 05 '22 18:10

Jag