Created
February 21, 2015 01:47
-
-
Save htakeuchi/ae8fbc427269e1272a2d to your computer and use it in GitHub Desktop.
Sample for using Fabric in RubyMotion
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
class LoginController < UIViewController | |
def viewDidLoad | |
super | |
@button = TWTRLogInButton.buttonWithLogInCompletion Proc.new {|session, error| | |
if error | |
NSLog("Error : #{error}") | |
else | |
NSLog("UserName : #{session.userName}") | |
App.window.rootViewController = TimelineController.alloc.initWithNibName(nil, bundle: nil) | |
end | |
} | |
@button.center = self.view.center | |
self.view.addSubview @button | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment