Sha256: c4c96b36a89d142a214e78e49f8d137868ce490a808957ae39bcb08c335d06c7
Contents?: true
Size: 926 Bytes
Versions: 3
Compression:
Stored size: 926 Bytes
Contents
class AppDelegate def application application, didFinishLaunchingWithOptions: launchOptions @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @controller = UIViewController.alloc.initWithNibName(nil, bundle:nil) @window.rootViewController = @controller @window.makeKeyAndVisible @label = UILabel.alloc.initWithFrame [ [10,10], [300,100] ] @label.setAccessibilityLabel 'username' @label.setText '...' @controller.view.addSubview @label Facebook.app_id = NSBundle.mainBundle.objectForInfoDictionaryKey('APP_ID') Facebook.sign_in do |granted, error| if granted @label.setText Facebook.accounts[0].username else puts error.code puts error.localizedDescription puts error.localizedRecoveryOptions puts error.localizedRecoverySuggestion @label.setText 'Fail... See Log' end end true end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
zuckermo-0.0.4 | app/app_delegate.rb |
zuckermo-0.0.3 | app/app_delegate.rb |
zuckermo-0.0.2 | app/app_delegate.rb |