Skip to content

Instantly share code, notes, and snippets.

@ys
Created April 13, 2013 10:32
Show Gist options
  • Save ys/5377886 to your computer and use it in GitHub Desktop.
Save ys/5377886 to your computer and use it in GitHub Desktop.
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@window.makeKeyAndVisible
if User.current && User.current.api_key
init_deck
else
login_controller = LoginController.new
login_controller.delegate = self
@window.rootViewController = login_controller
end
end
def init_deck
deck_controller = DeckController.alloc.init
puts deck_controller.class
@window.rootViewController = deck_controller
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment