Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a project using XIBs to Storyboard?

I have some complex XIB files in a project using TabBarViewControllers containing navigation controllers. Since Xcode 4.2 I cannot edit those XIB files usefully anymore: the contained view controllers are invisible, only represented as grey boxes. It seems that in Storyboard projects this is the default, and the next layer in the storyboard shows the details of the contained views / view controllers. So how can I switch my project to use a storyboard instead?

like image 477
Arne Avatar asked Feb 26 '12 22:02

Arne


People also ask

How do I change a project from Xcode to a storyboard?

Select the project in the left view and then select it in the Targets section shown. In 'Main Interface' select your MainStoryboard. That's as far as the apple guide gets you (unless using tables – see the guide link above).

How do I add a storyboard to an existing Xcode project?

Those exact steps (I am using XCode 4.5 and iOS 6.0 ): Add new storyboard to the project by File->New->File... ->Userinterface->storyboard. Go to project summary and select MainStoryboard and select the storyboard name you just created.


1 Answers

The objects are grayed out because of autolayout. Xcode understands that your controllers are not belonging to the current autolayout type.

To make the objects active, select one by one, select the attributes editor (see picture) and at the end of it, see if there is a checked word installed checked out. If there is more items them, delete all them and keep/add only the installed one.

enter image description here

like image 176
Duck Avatar answered Sep 27 '22 22:09

Duck