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 AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
# ... | |
navigation_appearance | |
#... | |
end | |
def navigation_appearance | |
# Background Color |
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 MyController < UIViewController | |
def viewDidLoad | |
@button = UIButton.alloc.init | |
@button.when_tapped do | |
weak_self = WeakRef.new(self) # <--- create a weak reference to self | |
@alert = UIAlertView.alertViewWithTitle "Alert", | |
message: "Message", | |
cancelButtonTitle: "Dismiss", |
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
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
require 'motion-cocoapods' | |
require 'bundler' | |
Bundler.require | |
Dir.glob('lib/tasks/*.rake').each { |r| import r } | |
VERSION = "1.0.2" |
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 MyClass | |
self.instance | |
Dispatch.once { @instance ||= self.new } | |
end | |
end |
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
#pragma mark - Transparent Modal View | |
-(void) presentTransparentModalViewController: (UIViewController *) aViewController | |
animated: (BOOL) isAnimated | |
withAlpha: (CGFloat) anAlpha{ | |
self.transparentModalViewController = aViewController; | |
UIView *view = aViewController.view; | |
view.opaque = NO; | |
view.alpha = anAlpha; |