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
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
290
HTML and CSS
willrax
0
170
SKFun
willrax
4
2.6k
iBeacons and RubyMotion
willrax
5
430
Other Decks in Programming
See All in Programming
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
dRuby over BLE
makicamel
2
390
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
990
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
130
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
310
Contextとはなにか
chiroruxx
1
380
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
14
5.9k
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
610
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
760
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Done Done
chrislema
186
16k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
870
GitHub's CSS Performance
jonrohan
1033
470k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
So, you think you're a good person
axbom
PRO
2
2.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
590
AI: The stuff that nobody shows you
jnunemaker
PRO
8
740
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