Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rubymotion. Sugar for iOS.
Search
Aliaksandr Lomau
December 07, 2013
Technology
1
190
Rubymotion. Sugar for iOS.
Cocoaheads, Grodno, December, 2013
Aliaksandr Lomau
December 07, 2013
Tweet
Share
More Decks by Aliaksandr Lomau
See All by Aliaksandr Lomau
Fails Night
allomov
0
31
"Ya Ne Lochu Comp" Challenge.
allomov
1
80
Catch and Throw in Ruby
allomov
0
34
Mortal Rubizza
allomov
0
66
Рэмбовидная проблема: особенности развития открытых технологий
allomov
0
44
Vault-tec: Safest Future
allomov
0
190
Promises and Reality
allomov
1
49
Cloud Theory for Rubizza Classes
allomov
0
76
Антология деплоя
allomov
0
71
Other Decks in Technology
See All in Technology
Can We Measure Developer Productivity?
ewolff
1
150
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
780
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
590
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
410
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.7k
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
The World Runs on Bad Software
bkeepers
PRO
65
11k
A designer walks into a library…
pauljervisheath
204
24k
Happy Clients
brianwarren
98
6.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Automating Front-end Workflow
addyosmani
1366
200k
A Philosophy of Restraint
colly
203
16k
KATA
mclloyd
29
14k
Building Applications with DynamoDB
mza
90
6.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Transcript
rubymotion Sugar for iOS
HELLO code1n « allomov đ
I will talk about rubymotion
I will talk about rubymotion RubyMotion Laurent Sansonetti
How it works? 1 2 3 4 RUBY CODE AST
(semantic tree) LLVM IR Machine code Ruby parser RubyMotion LLVM code generator
How it works? # Ruby "Hello BRUG".class.ancestors => [String, Comparable,
Object, Kernel, BasicObject] # RubyMotion "Hello BRUG".class.ancestors => [String, NSMutableString, NSString, Comparable, NSObject, Kernel] OBJECTS
Ruby is neat RubyMotion Objective-C
met aprogramming is almost magic
Objective-C <objc/runtime.h>
send def tableView(tableView, didSelectRowAtIndexPath:indexPath) menu_row = self.menu_items[indexPath.row] # => 'profile'
self.send("open_#{menu_row}") end ! def open_profile; #...; end def open_messages; #...; end ! def open_feed; # ...; end
method_missing Slide is missing Please, imagine suitable image
define_method module Mouth def self.can_say(name) define_method("say_#{name}") do name.upcase end end
end ! class Person include Mouth can_say :hello end ! person.say_hello # => "HELLO"
DSl Domain Specific Language
Teacup teacup :main_window do style :UILabel, text: 'Hello!' style :hi_button,
origin: [10, 10], title: 'Hi!' end
20.times do rmq.append(UIButton).tag(:foo).move(l: rand(200), t: rand(500), w: 80, h: 20).style
do |st| st.text = rand(200).to_s st.background_color = rmq.color.blue end end RMQ
REPL Wanna see some magic?
TDD RubyMotion integrates Bacon Bacon is small clone of the
popular RSpec it can simulate user behaviour on device
Game in 15 minutes?
REPL Wanna see some magic? AppStore
THANK YOU FOR YOUR ATTENTION. Bye ! code1n « allomov
đ