Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Load from Storyboard iOS Example
import UIKit
class ExampleViewController: UIViewController {
class func loadFromStoryboard(exampleService: ExampleService) -> ExampleViewController {
let exampleViewController:ExampleViewController =
UIStoryboard(name:"Main", bundle:NSBundle(forClass:self))
as! ExampleViewController
exampleViewController.exampleService = exampleService
return exampleViewController
required init?(coder aDecoder: NSCoder) {
self.exampleService = AppEnvironment.sharedEnvironment.exampleService
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment