Latest 0.2.0
License MIT
Platforms ios 8.0, tvos 9.0

CI Status


To run the example project, clone the repo, and run pod install from the Example directory first.


First of all make sure that inside your AppDelegate func didFinishLaunchingWithOptions we have this snippet:

window = UIWindow(frame:UIScreen.mainScreen().bounds)

Then you have to create a new enum of type StoryboardEnum.

import StoryboardEnum

enum Storyboard: StoryboardEnum {

    case Main

    var story: StoryboardVC {
        return StoryboardVC(inWindow: UIApplication.sharedApplication().windows.first!)

    var vc: UIViewController? {
        switch self {
            case Main:
            return story.getVC(fromStoryboard: "Main", withIdentifier: "Main")


Finally you have only to call wherever you want to present the view controller:

you can even show the vc embedded in a navigation using: true)

IMPORTANT If you plan to omit the identifier of the VC, please check that there is at least one VC set to be Initial view controller in your storyboard to avoid the app to crash.


I’ve added a nice way to embed a VC in navigationController, using embedInNavigation() func you will received your navigation w/ the view inside.


StoryboardEnum is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "StoryboardEnum"


Matteo Crippa, @ghego20


StoryboardEnum is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "StoryboardEnum",
    "version": "0.2.0",
    "summary": "Manage storyboard using a simple enum",
    "description": "An easy way to manage storyboards in your Swift project thanks to Enum",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Matteo Crippa": ""
    "source": {
        "git": "",
        "tag": "0.2.0"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    "source_files": "StoryboardEnum/Classes/**/*",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This