redpotion 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c2954e70dc1cf64c04d9fc1a02ee509e09f8aa8
4
- data.tar.gz: 6d91699310c70f8917cd0158c009d6c95998992d
3
+ metadata.gz: a9b8ee32a363f84ff5c649a79db3f1b765223547
4
+ data.tar.gz: 1264e0812b1839b17d50fbbb0f0c8ee7a70b3f55
5
5
  SHA512:
6
- metadata.gz: 797f9f817215881b74b8471a46cb9d47f1a61bcdb5d7a4ba6183f4fef4ba1c19f864cbb9c1b97aaed66946296509d652752da9124c8810098b363ced140d4ead
7
- data.tar.gz: b50859d174deabdfb5d836903feac0b98bfcdb8b2b919438d8fab8441a328ae1886964e24e81f02db1ac53c700298ff82acd8e1decdd4da5e91ec47bf510960f
6
+ metadata.gz: f0a181dd33480d1bf66903e0d69c9d5a99f68d11c0b648e7ee7fb21b6f4c8c5b92c1d23622e48e60be30c00c9beff76353330fb250268765e24af14a3041028f
7
+ data.tar.gz: 285fa2b7926ad247f1caaeb01ccd6163aaaf22e2502ff6a00822c0274cad865b5ecf997ea22333d5ce7a1cd31de2f2a01ec6998d1e3cad958cfb4d8d9cf9fdf4
@@ -92,11 +92,7 @@ class UIView
92
92
  rmq.stylesheet = value
93
93
  end
94
94
  end
95
-
96
95
  class UIViewController
97
- def on_load
98
- end
99
-
100
96
  def append(view_or_constant, style=nil, opts = {})
101
97
  view.append(view_or_constant, style, opts)
102
98
  end
@@ -154,16 +150,31 @@ class UIViewController
154
150
  @rmq_style_sheet_class
155
151
  end
156
152
 
153
+ def on_load
154
+ end
155
+
157
156
  def view_did_load
158
157
  end
158
+
159
+ # Monkey patch because I think that overriding viewDidLoad like this may be problematic
160
+ alias :originalViewDidLoad :viewDidLoad
159
161
  def viewDidLoad
160
162
  if self.class.rmq_style_sheet_class
161
163
  self.rmq.stylesheet = self.class.rmq_style_sheet_class
162
164
  self.view.rmq.apply_style :root_view
163
165
  end
164
166
 
165
- self.view_did_load
166
- self.on_load
167
+ self.originalViewDidLoad
168
+ unless pm_handles_did_load?
169
+ unless self.class.included_modules.include?(ProMotion::ScreenModule)
170
+ self.view_did_load
171
+ end
172
+ self.on_load
173
+ end
174
+ end
175
+
176
+ def pm_handles_did_load?
177
+ self.is_a?(ProMotion::ViewController) || self.is_a?(ProMotion::TableScreen)
167
178
  end
168
179
 
169
180
  def view_will_appear(animated)
@@ -197,6 +208,7 @@ class UIViewController
197
208
  end
198
209
 
199
210
  def should_autorotate
211
+ true
200
212
  end
201
213
  def shouldAutorotate
202
214
  self.should_autorotate
@@ -1,3 +1,3 @@
1
1
  module RedPotion
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
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.7
4
+ version: 0.4.8
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-08 00:00:00.000000000 Z
12
+ date: 2014-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_motion_query