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
RedPotion Introduction
Search
willrax
May 13, 2015
Programming
60
0
Share
RedPotion Introduction
An introduction to using RedPotion. The power of RMQ and ProMotion.
willrax
May 13, 2015
More Decks by willrax
See All by willrax
Testing Ember with Ember CLI Mirage
willrax
1
280
HTML and CSS
willrax
0
160
SKFun
willrax
4
2.6k
iBeacons and RubyMotion
willrax
5
430
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
110
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
210
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
850
Making the RBS Parser Faster
soutaro
0
500
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
630
事業会社でのセキュリティ長期インターンについて
masachikaura
0
260
NakouPAY説明用
annouim0
0
260
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
380
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
150
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
180
How Swift's Type System Guides AI Agents
koher
0
300
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
150
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
Between Models and Reality
mayunak
3
270
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
460
Code Review Best Practice
trishagee
74
20k
We Are The Robots
honzajavorek
0
220
Embracing the Ebb and Flow
colly
88
5k
Building an army of robots
kneath
306
46k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
GitHub's CSS Performance
jonrohan
1032
470k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
770
Transcript
willrax GitHub | Twitter | .com
AlphaSights engineering.alphasights.com
RedPotion
A Tale of Two Libraries
ProMotion’s Rubyification
App Delegate
App Delegate Entry Point
class AppDelegate def application(application, didFinishLaunchingWithOptions:launchOptions) controller = TopicsScreen.alloc.init controller.title =
"Application" controller.view.backgroundColor = UIColor.whiteColor navigation = UINavigationController.alloc .initWithRootViewController(controller) @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.rootViewController = navigation @window.makeKeyAndVisible true end end
class AppDelegate < PM::Delegate status_bar true, animation: :fade def on_load(app,
options) open TopicsScreen.new(nav_bar: true) end end
Loading Table Data
def tableView(table, cellForRowAtIndexPath: index_path) end def numberOfSectionsInTableView(table) end def tableView(table,
numberOfRowsInSection: section) end
def table_data [{ title: "", cells: topics.map do |topic| {
title: topic.title, subtitle: "Last Poster: #{topic.last_poster}", action: :open_profile, arguments: { topic: topic } } end }] end
Fallback to Cocoa API
Forms In App Purchases Maps Side Menus Many More…
ProMotion
ProMotion
RMQ’s UI Magic
class UserScreenStylesheet < ApplicationStylesheet def root_view(style) style.background_color = color.white end
def name_label(style) style.frame = { top: 90, from_right: 20, right_of_previous: 20, height: 150 } style.number_of_lines = 0 style.text_alignment = :left style.line_break_mode = :word_wrapping style.font = UIFont.boldSystemFontOfSize(25.0) end end
class UserScreen < PM::Screen stylesheet UserScreenStylesheet def stylesheet build_initial_ui end
def build_initial_ui append(UIImageView, :avatar_image) append(UILabel, :name) append(UILabel, :details_title) append(UILabel, :last_seen_at) end end
ProMotion RMQ ❤
Commonly Used Gems
RMQ ProMotion CDQ AFMotion
Simple Structure
app views models stylesheets screens
potion create
Demo Time