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
50
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
270
HTML and CSS
willrax
0
160
SKFun
willrax
4
2.6k
iBeacons and RubyMotion
willrax
5
400
Other Decks in Programming
See All in Programming
Catch Up: Go Style Guide Update
andpad
0
230
Cursorハンズオン実践!
eltociear
2
1.1k
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.3k
overlayPreferenceValue で実現する ピュア SwiftUI な AdMob ネイティブ広告
uhucream
0
180
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
230
CSC305 Lecture 08
javiergs
PRO
0
200
はじめてのDSPy - 言語モデルを『プロンプト』ではなく『プログラミング』するための仕組み
masahiro_nishimi
2
480
dynamic!
moro
10
8k
品質ワークショップをやってみた
nealle
0
270
Web フロントエンドエンジニアに開かれる AI Agent プロダクト開発 - Vercel AI SDK を観察して AI Agent と仲良くなろう! #FEC余熱NIGHT
izumin5210
3
530
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
32k
Leading Effective Engineering Teams in the AI Era
addyosmani
5
430
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Music & Morning Musume
bryan
46
6.8k
Six Lessons from altMBA
skipperchong
29
4k
The World Runs on Bad Software
bkeepers
PRO
72
11k
Automating Front-end Workflow
addyosmani
1371
200k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
BBQ
matthewcrist
89
9.8k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Optimizing for Happiness
mojombo
379
70k
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