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
0
48
RedPotion Introduction
An introduction to using RedPotion. The power of RMQ and ProMotion.
willrax
May 13, 2015
Tweet
Share
More Decks by willrax
See All by willrax
Testing Ember with Ember CLI Mirage
willrax
1
260
HTML and CSS
willrax
0
150
SKFun
willrax
4
2.6k
iBeacons and RubyMotion
willrax
5
400
Other Decks in Programming
See All in Programming
MLOps Japan 勉強会 #52 - 特徴量を言語を越えて一貫して管理する, 『特徴量ドリブン』な MLOps の実現への試み
taniiicom
2
640
Devinで実践する!AIエージェントと協働する開発組織の作り方
masahiro_nishimi
6
2.9k
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
330
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
180
TypeScript LSP の今までとこれから
quramy
1
480
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
950
Zennの運営完全に理解した #完全に理解したTalk
wadayusuke
1
180
セキュリティマネジャー廃止とクラウドネイティブ型サンドボックス活用
kazumura
1
160
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
370
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
190
赤裸々に公開。 TSKaigiのオフシーズン
takezoux2
0
110
SODA - FACT BOOK
sodainc
1
670
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
The Invisible Side of Design
smashingmag
299
50k
Optimizing for Happiness
mojombo
379
70k
Site-Speed That Sticks
csswizardry
10
620
The World Runs on Bad Software
bkeepers
PRO
68
11k
Balancing Empowerment & Direction
lara
1
210
The Pragmatic Product Professional
lauravandoore
35
6.7k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Building Applications with DynamoDB
mza
95
6.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
42
2.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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