2. @clayallsopp
- http://rubymotion-tutorial.com
- http://github.com/clayallsopp/
- Formotion, Routable, and more
- http://bubblewrap.io
- Upcoming RubyMotion PragProgs book
3. Where are we now?
May 2012 - Sept 2012
- Production, award-winning apps shipping
- New RM features and bugfixes weekly-ish
- Awesome, active community
4. Where are we going?
→ Community will make or break RM
6. Wrapping ObjC
Wave 2
BW::Location.get do |result|
p "From Lat #{result[:from].latitude},
BubbleWrap Long #{result[:from].longitude}"
p "To Lat #{result[:to].latitude},
Long #{result[:to].longitude}"
end
Twitter::Composer.compose(tweet: 'Hello RubyMotion!',
urls: ["http://clayallsopp.com"]) do |composer|
if composer.error
# ...
elsif composer.cancelled?
# ...
Twittermotion elsif composer.done?
# ...
end
end
7. New Metaphors
Wave 3
Teacup::Stylesheet.new(:some_view) do
style :root,
landscape: true
style :field,
left: 10,
top: 10, class SomeController < UIViewController
width: 200, stylesheet :some_view
height: 50,
landscape: { layout :root do
width: 360 subview(UITextField, :field)
} @search = subview(UITextField, :search)
end
style :search, extends: :field, end
left: 10,
top: 70,
placeholder: 'Find something...'
style UITextField,
textColor: UIColor.redColor
end
Teacup
8. New Metaphors
Wave 3
class User
include Formotion::Formable
form_property :name, :string
form_property :score, :number
form_property :team, :picker, items: ["Red", "Blue", "Green"]
form_title "Edit User"
end
# ...
user = User.new("Harry", 100, "Green")
controller = Formotion::FormableController.alloc.initWithModel(user)
self.navigationController << controller
Formotion
9. New Metaphors
Wave 3
class Task < Nitron::Model
def self.all
order("due")
end
end
class TaskListViewController < Nitron::TableViewController
collection { Task.all }
end
Nitron