Created
November 10, 2015 18:06
-
-
Save eugeniobaglieri/dec497468235a571c2cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIStoryboaard+Conveniences.swift | |
// Temi Svolti | |
// | |
// Created by Eugenio Baglieri on 09/11/15. | |
// Copyright © 2015 Eugenio Baglieri. All rights reserved. | |
// | |
import UIKit | |
extension UIStoryboard { | |
class func mainStoryboard() -> UIStoryboard! { | |
guard let mainStoryboardName = NSBundle.mainBundle().infoDictionary?["UIMainStoryboardFile"] as? String else { | |
assertionFailure("No UIMainStoryboardFile found in main bundle") | |
return nil | |
} | |
return UIStoryboard(name: mainStoryboardName, bundle: NSBundle.mainBundle()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment