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
77
Catch and Throw in Ruby
allomov
0
34
Mortal Rubizza
allomov
0
63
Рэмбовидная проблема: особенности развития открытых технологий
allomov
0
40
Vault-tec: Safest Future
allomov
0
170
Promises and Reality
allomov
1
48
Cloud Theory for Rubizza Classes
allomov
0
73
Антология деплоя
allomov
0
70
Other Decks in Technology
See All in Technology
EitherT_with_Future
aoiroaoino
1
1.1k
不動産tech Product Night#2_AIことはじめ_GA橋本
takehikohashimoto
0
120
Google CloudのLLM活用の選択肢を広げるVertex AIのパートナーモデル
nayuts
0
110
「認証認可」という体験をデザインする ~Nekko Cloud認証認可基盤計画
logica0419
2
250
自社サービスのための独自リリース版Redmine「RedMica」の取り組み
vividtone
0
1.1k
Oracle Exadata Database Service(Dedicated Infrastructure):サービス概要のご紹介
oracle4engineer
PRO
0
9.5k
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
300
LLVM/ASMを使った有限体の高速実装
herumi
0
120
どこよりも遅めなWinActor Ver.7.5.0 新機能紹介
tamai_63
0
100
より快適なエラーログ監視を目指して
leveragestech
4
1.3k
SORACOMで実現するIoTのマルチクラウド対応 - IoTでのクリーンアーキテクチャの実現 -
kenichirokimura
0
360
ロボットアームを遠隔制御の話 & LLMをつかったIoTの話もしたい
soracom
PRO
1
270
Featured
See All Featured
It's Worth the Effort
3n
182
27k
How STYLIGHT went responsive
nonsquared
93
5.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
45
4.8k
Being A Developer After 40
akosma
84
590k
Producing Creativity
orderedlist
PRO
340
39k
Automating Front-end Workflow
addyosmani
1365
200k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.9k
Building Flexible Design Systems
yeseniaperezcruz
325
37k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
How to Ace a Technical Interview
jacobian
275
23k
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
đ