redpotion 0.4.4 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/project/pro_motion/table.rb +21 -0
- data/lib/project/ruby_motion_query/ext.rb +75 -4
- data/lib/project/version.rb +1 -1
- metadata +3 -3
- data/lib/project/pro_motion/screen_module.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b806223e888526554660bda712f18a018feb13a
|
4
|
+
data.tar.gz: 1e7a16bf05593230aa288fe4810200293aef90ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4072fea23f452f7396c059a2736a7897068e8d7c3892d9671e9451523bfcb80621e68f7e117519541ea00ab039a7f413aa93f57684f703432a051bfc91720a67
|
7
|
+
data.tar.gz: c4ae94132507c8dfa9fe0aedfe428f27b6916548401cada17a55dcf7d2c68208ea50ab286ddbe61295a687a235813146d3546f360845e15020ed4b28e5917195
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module ProMotion
|
2
|
+
class TableScreen < TableViewController
|
3
|
+
|
4
|
+
# Temporarily here until this is added to ProMotion
|
5
|
+
def create_table_cell(data_cell)
|
6
|
+
new_cell = nil
|
7
|
+
table_cell = table_view.dequeueReusableCellWithIdentifier(data_cell[:cell_identifier]) || begin
|
8
|
+
new_cell = data_cell[:cell_class].alloc.initWithStyle(data_cell[:cell_style], reuseIdentifier:data_cell[:cell_identifier])
|
9
|
+
new_cell.extend(PM::TableViewCellModule) unless new_cell.is_a?(PM::TableViewCellModule)
|
10
|
+
new_cell.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin
|
11
|
+
new_cell.clipsToBounds = true # fix for changed default in 7.1
|
12
|
+
new_cell.send(:on_load) if new_cell.respond_to?(:on_load)
|
13
|
+
new_cell.setup(data_cell, self)
|
14
|
+
new_cell
|
15
|
+
end
|
16
|
+
table_cell.send(:on_reuse) if !new_cell && table_cell.respond_to?(:on_reuse)
|
17
|
+
table_cell
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -3,7 +3,9 @@ class Object
|
|
3
3
|
rmq.app
|
4
4
|
end
|
5
5
|
|
6
|
-
|
6
|
+
def find(*args) # Do not alias this, strange bugs happen where classes don't have methods
|
7
|
+
rmq(args)
|
8
|
+
end
|
7
9
|
end
|
8
10
|
|
9
11
|
class UIView
|
@@ -93,11 +95,8 @@ end
|
|
93
95
|
|
94
96
|
class UIViewController
|
95
97
|
def on_load
|
96
|
-
# Abstract
|
97
98
|
end
|
98
|
-
end
|
99
99
|
|
100
|
-
class ProMotion::ScreenModule
|
101
100
|
def append(view_or_constant, style=nil, opts = {})
|
102
101
|
view.append(view_or_constant, style, opts)
|
103
102
|
end
|
@@ -148,4 +147,76 @@ class ProMotion::ScreenModule
|
|
148
147
|
def stylesheet=(value)
|
149
148
|
rmq.stylesheet = value
|
150
149
|
end
|
150
|
+
def self.stylesheet(style_sheet_class)
|
151
|
+
@rmq_style_sheet_class = style_sheet_class
|
152
|
+
end
|
153
|
+
def self.rmq_style_sheet_class
|
154
|
+
@rmq_style_sheet_class
|
155
|
+
end
|
156
|
+
|
157
|
+
def view_did_load
|
158
|
+
end
|
159
|
+
def viewDidLoad
|
160
|
+
if self.class.rmq_style_sheet_class
|
161
|
+
self.rmq.stylesheet = self.class.rmq_style_sheet_class
|
162
|
+
self.view.rmq.apply_style :root_view
|
163
|
+
end
|
164
|
+
|
165
|
+
self.view_did_load
|
166
|
+
self.on_load
|
167
|
+
end
|
168
|
+
|
169
|
+
def view_will_appear(animated)
|
170
|
+
end
|
171
|
+
def viewWillAppear(animated)
|
172
|
+
self.view_will_appear(animated)
|
173
|
+
end
|
174
|
+
|
175
|
+
def view_did_appear(animated)
|
176
|
+
end
|
177
|
+
def viewDidAppear(animated)
|
178
|
+
self.view_did_appear(animated)
|
179
|
+
end
|
180
|
+
|
181
|
+
def view_will_disappear(animated)
|
182
|
+
end
|
183
|
+
def viewWillDisappear(animated)
|
184
|
+
self.view_will_disappear(animated)
|
185
|
+
end
|
186
|
+
|
187
|
+
def view_did_disappear(animated)
|
188
|
+
end
|
189
|
+
def viewDidDisappear(animated)
|
190
|
+
self.view_did_disappear(animated)
|
191
|
+
end
|
192
|
+
|
193
|
+
def should_rotate(orientation)
|
194
|
+
end
|
195
|
+
def shouldAutorotateToInterfaceOrientation(orientation)
|
196
|
+
self.should_rotate(orientation)
|
197
|
+
end
|
198
|
+
|
199
|
+
def should_autorotate
|
200
|
+
end
|
201
|
+
def shouldAutorotate
|
202
|
+
self.should_autorotate
|
203
|
+
end
|
204
|
+
|
205
|
+
def will_rotate(orientation, duration)
|
206
|
+
end
|
207
|
+
def willRotateToInterfaceOrientation(orientation, duration:duration)
|
208
|
+
self.will_rotate(orientation, duration)
|
209
|
+
end
|
210
|
+
|
211
|
+
def on_rotate(orientation)
|
212
|
+
end
|
213
|
+
def didRotateFromInterfaceOrientation(orientation)
|
214
|
+
self.on_rotate orientation
|
215
|
+
end
|
216
|
+
|
217
|
+
def will_animate_rotate(orientation, duration)
|
218
|
+
end
|
219
|
+
def willAnimateRotationToInterfaceOrientation(orientation, duration: duration)
|
220
|
+
self.will_animate_rotate(orientation, duration)
|
221
|
+
end
|
151
222
|
end
|
data/lib/project/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redpotion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InfiniteRed
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ruby_motion_query
|
@@ -92,7 +92,7 @@ extra_rdoc_files: []
|
|
92
92
|
files:
|
93
93
|
- README.md
|
94
94
|
- bin/potion
|
95
|
-
- lib/project/pro_motion/
|
95
|
+
- lib/project/pro_motion/table.rb
|
96
96
|
- lib/project/redpotion.rb
|
97
97
|
- lib/project/ruby_motion_query/app.rb
|
98
98
|
- lib/project/ruby_motion_query/ext.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module ProMotion
|
2
|
-
module ScreenModule
|
3
|
-
def view_did_load
|
4
|
-
if self.class.rmq_style_sheet_class
|
5
|
-
self.rmq.stylesheet = self.class.rmq_style_sheet_class
|
6
|
-
self.view.rmq.apply_style :root_view
|
7
|
-
end
|
8
|
-
|
9
|
-
self.on_load
|
10
|
-
end
|
11
|
-
|
12
|
-
module RedPotionClassMethods
|
13
|
-
def stylesheet(style_sheet_class)
|
14
|
-
@rmq_style_sheet_class = style_sheet_class
|
15
|
-
end
|
16
|
-
|
17
|
-
def rmq_style_sheet_class
|
18
|
-
@rmq_style_sheet_class
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.included(base)
|
23
|
-
base.extend(ClassMethods)
|
24
|
-
base.extend(TabClassMethods) # TODO: Is there a better way?
|
25
|
-
base.extend(RedPotionClassMethods)
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|