Skip to content

Instantly share code, notes, and snippets.

@jaunesarmiento
Created January 4, 2014 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaunesarmiento/8255099 to your computer and use it in GitHub Desktop.
Save jaunesarmiento/8255099 to your computer and use it in GitHub Desktop.
RubyMotion Tips
class AppDelegate
attr_accessor :window, :storyboard
def application(application, didFinishLaunchingWithOptions: launchOptions)
# Switch to a new rootViewController with transition
UIView.transitionWithView(
@window,
duration: 0.5,
options: UIViewAnimationOptionTransitionFlipFromLeft,
animations: lambda do
@window.rootViewController = @storyboard.instantiateViewControllerWithIdentifier("ViewController")
end,
completion: nil
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment