By Gant Laborde
Avid Rubyist and generally immature guy
Co-Founder of IconoclastLabs.com
Core-contributor to RubyMotion/InfiniteRed/Clearsight Studio
Author of Numerous RubyMotion projects and Pull Requests
Author of the book RubyMotion App Development
by Packt Publishing.
OR
Objective-C button tap
[button addTarget:self action:@selector(buttonTapped:)
forControlEvents: UIControlEventTouchUpInside];
// Elsewhere
- (void)buttonTapped:(id)sender {
self.view.backgroundColor = [UIColor redColor];
}
RubyMotion button tap
button.addTarget(self, action:'button_tapped', forControlEvents:UIControlEventTouchUpInside)
# Elsewhere
def button_tapped
self.view.backgroundColor = UIColor.redColor
end
Objective-C button tap
[button addTarget:self action:@selector(buttonTapped:)
forControlEvents: UIControlEventTouchUpInside];
// Elsewhere
- (void)buttonTapped:(id)sender {
self.view.backgroundColor = [UIColor redColor];
}
RubyMotion button tap (with RedPotion gem)
find(button).on(:tap) do
self.view.backgroundColor = color.red
end
lessLike:objectiveC:
and more like_ruby
- Clay Allsopp
Ruby is Evolving
Ruby is Chosen
Ruby is Everywhere
In my opinion
RubyMotion is to Objective-C
As Coffeescript is to Javascript
... plus RMQ is kind of like jQuery
... plus MacBacon has spec tests like Jasmine would
... plus the REPL lets you live-modify like developer tools
... plus CDQ gives you a DB like CouchDB would
... plus it compiles and obfuscates your final codebase
... OK, this analogy got out of control
class AppDelegate < PM::Delegate
def on_load(app, options)
open HelloWorldController.new(nav_bar: true)
end
end
class HelloWorldController < PM::Screen
def on_load
p "Hai"
end
end
SImply prints "Hai"
We can add a label to the screen just as easily.
A game made in one day!
It's a great way to make money!
Fandor wanted to make it easy for people to discover and watch handpicked, award-winning movies of all lengths and genres, from the world’s most respected filmmakers. They aim to create a global community of film lovers and makers connected by meaningful and entertaining cinematic experiences as well as deliver a fair revenue share to filmmakers and distributors.