Skip to content

Instantly share code, notes, and snippets.

@htakeuchi
Created February 21, 2015 01:47
Show Gist options
  • Save htakeuchi/ae8fbc427269e1272a2d to your computer and use it in GitHub Desktop.
Save htakeuchi/ae8fbc427269e1272a2d to your computer and use it in GitHub Desktop.
Sample for using Fabric in RubyMotion
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