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
42
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
250
HTML and CSS
willrax
0
150
SKFun
willrax
4
2.5k
iBeacons and RubyMotion
willrax
5
390
Other Decks in Programming
See All in Programming
もう僕は OpenAPI を書きたくない
sgash708
5
1.9k
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
490
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Angular Meetup Berlin
danielsogl
0
100
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
260
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.5k
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
140
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
290
Ça bouge du côté des animations CSS !
goetter
2
140
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
1
370
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
810
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
650
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
190
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Mobile First: as difficult as doing things right
swwweet
223
9.4k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Building Adaptive Systems
keathley
40
2.4k
Why Our Code Smells
bkeepers
PRO
336
57k
RailsConf 2023
tenderlove
29
1k
Site-Speed That Sticks
csswizardry
4
400
Six Lessons from altMBA
skipperchong
27
3.6k
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