Created
May 23, 2012 17:40
-
-
Save vishnugopal/2776589 to your computer and use it in GitHub Desktop.
A Rubymotion Storyboard Delegate that automatically loads the initial storyboard (marked with identifier "Start")
This file contains hidden or 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
class StoryboardDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
storyboard = UIStoryboard.storyboardWithName("Storyboard", bundle: NSBundle.mainBundle) | |
viewController = storyboard.instantiateViewControllerWithIdentifier("Start") | |
if self.respond_to?("initializeRootViewController:forApplication:launchedWithOptions:") | |
viewController = initializeRootViewController(viewController, forApplication:application, launchedWithOptions:launchOptions) | |
end | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
@window.rootViewController = viewController | |
@window.makeKeyAndVisible | |
true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment