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 - Ruby <3 iOS
Search
Tiago Bastos
April 08, 2013
Programming
98
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rubymotion - Ruby <3 iOS
Tiago Bastos
April 08, 2013
More Decks by Tiago Bastos
See All by Tiago Bastos
Ruby & Elixir - Real time applications
bastos
4
290
Não está feito até estar testado
bastos
2
190
Other Decks in Programming
See All in Programming
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
180
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
4
2.8k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
120
JavaDoc 再入門
nagise
0
310
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
640
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
Contextとはなにか
chiroruxx
0
260
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
さぁV100、メモリをお食べ・・・
nilpe
0
130
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Claude Code のすすめ
schroneko
67
230k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
The Art of Programming - Codeland 2020
erikaheidi
57
14k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
190
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Faster Mobile Websites
deanohume
310
31k
Transcript
Rubymotion Ruby <3 iOS Monday, 8 April 13
Tiago Bastos • @bastos • github/bastos •
[email protected]
Monday, 8
April 13
Monday, 8 April 13
Why? • Ruby • Ruby • Ruby • Nativo •
Ferramentas Monday, 8 April 13
Why? • Ruby • Ruby • Ruby • Nativo •
Ferramentas (VIM) Monday, 8 April 13
Nativo? Monday, 8 April 13
NATIVO Monday, 8 April 13
LLVM Monday, 8 April 13
Monday, 8 April 13
Runtime Unificada Monday, 8 April 13
Mais • Gerenciamento de memória ARC Like • Concorrência (GCD)
• Rápido (já falei, nativo!) • App Store (TM) Safe Monday, 8 April 13
Ruby Monday, 8 April 13
Ruby • Módulos (Namespace) • Re exão e meta programação
• O Ruby que você conhece, Menos Eval • DSLs Monday, 8 April 13
DSLs e Wrappers • Teacup • SugarCube • Bubblewrap Monday,
8 April 13
Monday, 8 April 13
class MyController < UIViewController stylesheet :main_screen layout do
subview(UIButton, :finished_button) end end Monday, 8 April 13
Teacup::Stylesheet.new :main_screen do style :finished_button, origin:
[10, 10], title: 'Hi!' end Monday, 8 April 13
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://github.com"]]; Monday, 8 April 13
"https://github.com".nsurl.open Monday, 8 April 13
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Do you want to
say hello?" message:@"More info..." delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Say Hello",nil]; [alert show]; -‐ (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { NSLog(@"Cancel Tapped."); } else if (buttonIndex == 1) { NSLog(@"OK Tapped. Hello World!"); } } Monday, 8 April 13
UIAlertView.alert "Is this cool?", buttons: %w[No! Sure! Hmmmm],
message: "No going back now", cancel: proc { self.cancel }, success: proc { |pressed| self.proceed if pressed == "Sure!" } Monday, 8 April 13
UIView.animation_chain { view.slide(:left, 20) }.and_then { view.slide(:up, 20)
}.and_then { view.slide(:right, 20) }.and_then { view.slide(:down, 20) }.and_then { view.fade_out }.start Monday, 8 April 13
BW::Location.get do |result| p "From Lat #{result[:from].latitude}, Lng
#{result[:from].longitude}" p "To Lat #{result[:to].latitude}, Lng #{result[:to].longitude}" end Monday, 8 April 13
Testes Monday, 8 April 13
button = UIButton.buttonWithType(UIButtonTypeRoundedRect) button.setTitle('Take over the world', forState:UIControlStateNormal) window.addSubview(button)
tap 'Take over the world' Monday, 8 April 13
Mais! • Bootstrap Simples • Rubygems • Testes • Usar
bibliotecas em Objective-C (não é bridge!) Monday, 8 April 13
Ferramentas • Terminal based • Rake • Debugging (GDB based)
• Use seu Editor • CocoaPods Monday, 8 April 13
Monday, 8 April 13
Monday, 8 April 13
Monday, 8 April 13
app.version = '1.0.0' app.device_family = [:iphone] app.interface_orientations
= [:portrait] app.files += Dir.glob(File.join(app.project_dir, 'styles/**/*.rb')) app.development do app.codesign_certificate = "iPhone Developer: Tiago Bastos da Silva (HL4267W8QH)" app.provisioning_profile = File.expand_path("~/Library/MobileDevice/Provisioning Profiles/CE5529C9-‐0F02-‐40BA-‐ B2D9-‐8A342757DBB9.mobileprovision") end app.libs += %w(/usr/lib/libz.dylib /usr/lib/libsqlite3.dylib) app.pods do pod 'Facebook-‐iOS-‐SDK', '~> 3.2.1' pod 'MBProgressHUD' end app.frameworks += [ 'AudioToolbox', 'CFNetwork', 'CoreGraphics', 'CoreLocation', 'MobileCoreServices', 'QuartzCore', 'Security', 'StoreKit', 'SystemConfiguration', 'Accounts', 'AdSupport', 'Social' Monday, 8 April 13
Perguntas? Monday, 8 April 13
Perguntas? Não? Monday, 8 April 13
Perguntas? Não? Ok Monday, 8 April 13