12

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

Craig Mellon
  • 5,399
  • 2
  • 20
  • 25

1 Answers1

9

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>
rockeye
  • 2,765
  • 2
  • 30
  • 44
  • This is obviously the proper answer - why isn't it so marked and rock eye given the Bounty? It is what I was going to say before I read the answer... – David H Jan 14 '12 at 18:17
  • Just gave the bounty to rockeye. Craig needs to mark this as the Answer. – Oli Jan 16 '12 at 21:25