Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Interface Builder document versioning default to 4.2?

When I create a new xib in interface builder the Interface Builder Document (Versioning) development parameter is defaulting to xCode 4.1

Is there anyway to default this to xCode 4.2 - The reason I ask is I recently changed a project to use IOS 5 and 4.2 - The project was originally created in 4.1, and when I create a new xib and set the size of the view to "Form Sheet" it generates a waring:

Attribute Unavailable: Form Sheet simulated metrics are not available prior to Xcode 4.2.

Interface Builder Document property 4.1

I can fix the warning by changing the Document Version drop down in the property inspector to 4.2

Interface Builder Document property 4.2

like image 355
Craig Mellon Avatar asked Dec 21 '11 09:12

Craig Mellon


1 Answers

You will have to modify directly the XCode templates :

/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/File Templates/User Interface - Contains templates when you choose the menu File->New...->New File...

/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/User Interface - Contains templates when you choose the menu File->New...->New Project...

Edit the any xib you want by adding this inside <archive><data>:

<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
    <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
    <real value="4200" key="NS.object.0"/>
</object>
like image 108
rockeye Avatar answered Sep 23 '22 16:09

rockeye