Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does storyboard replace .xib file in Xcode 4.2

Tags:

xcode

Have started playing with Xcode 4.2, and created a single page application using storyboard and ARC. When I opened up the file, there are five files: AppDelegate .h and .m and ViewController .h, .m and storyboard.

No .xib file.

Is this normal? Or do I need to do something to generate a .xib file?

Thank you.

like image 812
pdenlinger Avatar asked Nov 19 '11 19:11

pdenlinger


People also ask

What happens when I change the Xib in a storyboard?

If you make changes to the xib, they will appear in the storyboard instance and at runtime. If you add another instance of the CustomView in another storyboard scene, it will also use the xib layout.

How do I override the content size of an Xib?

Constraints all work as you’d expect. The intrinsicContentSize is taken as the size of the view in the xib. You can override it using the intrinsicSize property. If you change the background colour of an instance (eg in a storyboard), it overrides the background colour of the xib (for that instance).

How does Xib work in bfwcontrols?

If you make changes to the xib, they will appear in the storyboard instance and at runtime. If you add another instance of the CustomView in another storyboard scene, it will also use the xib layout. In BFWControls, the NibView and NibTableViewCell classes take care of all of the engineering that you would just hope was there, including:

How do I add bfwcontrols to my Xcode project?

If you have installed CocoaPods, configured your Xcode project to use it (i.e. pod init ), then you can add the BFWControls pod to your Podfile, run pod install, and you’re all ready. If you don’t use CocoaPods, then you can instead walk through this simple step by step guide on how to Add a Framework to an iOS App, as a Git submodule.


1 Answers

This is normal. Storyboards eliminate the need for seperate .xibs. Be advised that using storyboards means you can NOT target devices running any iOS below 5.0. If this is important to you, like it is to me, then create your projects with the 'Use Storyboard' unchecked.

Uncheck "Use Storyboard" when creating a project

like image 110
NJones Avatar answered Nov 01 '22 07:11

NJones