BlackHatSamurai
BlackHatSamurai

Reputation: 23483

Problems going from Storyboard to XIB?

I started a project using the Storyboard in Xcode 6 and now I think I would like to use XIB files. Are there any risks associated with moving from Storyboard to XIB? I thought I read somewhere that Xcode 6 would prefer developers to use the Storyboard, is this true? Are there benefits of using the Storyboard over XIB files? I feel like you have more control when using XIB files. Is there something I'm missing? Am I able to convert fairly easily or would it make more sense to start my project over?

I'm an Android developer moving into iOS, so please forgive my lack of knowledge on the subject.

UPDATE

I am more interested in knowing if there are any risks or problems in switching from Storyboard to XIB mid project. Currently, I'm using Storyboard, but I am thinking of switching some parts to XIB. Will this cause any problems with my project? Is there anything I need to be aware of in doing this?

Upvotes: 2

Views: 2137

Answers (4)

DanielG
DanielG

Reputation: 2377

I would take a look at the answers to this question for some great info.

Here's a quick summary:

  • Storyboards have some great features such as letting you create segues between views, and design table view cells in-place.
  • The biggest downside to storyboards is working a project with multiple developers. Dealing with merge conflicts can be a big headache.

Upvotes: 0

Fogmeister
Fogmeister

Reputation: 77641

Code, storyboard and xibs are all different ways of creating views and layouts.

There is no rule that says you can only use one of them in a project.

In most of my projects I use a combination of all three.

Storyboards give a quick and easy way to create "flow" in the app. I tend to use one storyboard per "workflow" inside the app.

Xibs I tend to use for views that are common in multiple places within the app. In a storyboard I'd have to define them multiple times. Using xibs is a bit like refactoring interface builder files.

I then fall back to using code when necessary. Sometimes it isn't possible to do what I want with interface builder.

To say that you are only going to use xibs is purely denying yourself access to the other tools. Learn when to use each and how to use them together.

Upvotes: 2

Duncan C
Duncan C

Reputation: 131418

There are some things like container views and embed segues that only work with Storyboards.

For the most part, though, it's a question of personal taste.

Apple does seem to be moving in the direction of Storyboards, so as a new developer you may want to put your efforts into Storyboards.

Upvotes: 1

almas
almas

Reputation: 7187

There are a lot of articles on the internet that discuss this topic, example: http://www.toptal.com/ios/ios-user-interfaces-storyboards-vs-nibs-vs-custom-code

Upvotes: 0

Related Questions