Search code examples
iphoneiosipadxcode4

How do you disable storyboard?


I made ​​an app for iPhone and iPad with storyboard.Let me know if you can disable storyboard in project or do I need to create a new project without storyboard.


Solution

  • There are a few reasons why you might want to disable storyboards in an iOS project. Here are three off the top of my head:

    1)

    you need to support an iOS version that's older than 5 (storyboards came in with iOS 5) Storyboard functionality is only supported in iOS 5 & newer, so if you want to disable it, just target anything older than 5 (e.g. iOS 4.3). Here's a potentially related question.

    2)

    you have a storyboard for much of the functionality of your app but you also want to offer additional functionality via XIB files.

    3)

    Too many engineers on one team messing with one storyboard file can corrupt or mess up the storyboard, so additional functionality can be added via xib files (and it's easier for one engineer to "own" -- or at least modify without colliding or losing changes within -- each xib file).

    Simply delete the Storyboard from the summary for your project's target (which also appears in the Info.plist file) and replace it with a XIB file (which is the value for the "NSMainNibFile" key in the info.plist file).