The differences between xib files and storyboards in iOS development



The differences between xib files and storyboards in iOS development

The differences between xib files and storyboards in iOS development

Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel

A xib file is usually one of the views of our Graphical User Interface in the app we are working on. It is usually associated with a view-controller class, which is nothing else than a subclass of the generic UIViewController class.

Initially the xib file had the .nib extension, and therefore nowadays iOS developers use them interchangeably (just in case you hear somebody talking about nib files, you should know that they actually represent the same thing).

The xib file are supporting in all versions of iOS, and they generally represent one screen of the app that the user sees on one time, or a portion of the screen – in the case of some iPad apps, that make use of the UISplitViewController class.

In Fall 2011, when iOS 5 was released, a new way of visually organising the views of our apps was introduced – Storyboards. They have the .storyboard extension, and by looking inside them we can instantly get a general idea of our app’s Workflow. A Storyboard contains one or more scenes, and the connection between them is done with segues, which
are both new concepts in iOS 5 developing using Xcode 4.2.

However, if you upgrade you apps to use Storyboards, or start from scratch using the new way, they will not run on iOS 4 and earlier iOS versions, because they are not supported there. Taking i account that more than 80% of users updated to iOS 5, it’s your own decision if you want to make your apps backward compatible.

For the purpose of explaining the basic things in iOS development we’ll firstly discuss about xib files, and after a while, we’ll switch on to using Storyboard all the times.

Comments are closed.