ProMotion 2.0.0.rc3 → 2.0.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bc46b2fce8940f383e15d567a97406d86695677
4
- data.tar.gz: 3a11bc409b27339f4df881c5d1e5bd3a7b64b2b3
3
+ metadata.gz: ea6af0484e34faeafec191a216b90c86b55e98e8
4
+ data.tar.gz: 35f7327f1bc729c3d2735c7f4f2964c524787bc7
5
5
  SHA512:
6
- metadata.gz: 9dcc94f58b16ecf592701ca0d5061eea10afa1caed1d9f6733e2825375eba6273bcb8808c340b7306d4a174c768d6c147b9557a1aa3f99dfa4e36673b5bd581a
7
- data.tar.gz: 15a08781adb01444520577850cd274ef2f803a4bc7a7f17ba0b81153de4e78dbdd6f470e91c352453d79549f69dfa31f9cb1bee3669a15a50c3e52b7bdfdd323
6
+ metadata.gz: d23b14a0edb28445c4f2299997e680c2a998416c6028c7a0fd1496fa814e321400d603953d02e5edf9c5bad6802b5aa337e0d6553ca21f7479ec938d2b644ff6
7
+ data.tar.gz: 8fbd692e984a128801f617ec9833af4a753a028dcb14a916eb7f4fa4730626e4964867fb14b9d8ef412684129dfcdb1aaee92c5a33b72d3971ff1124fc9f3ef2
@@ -44,7 +44,7 @@ module ProMotion
44
44
  def add_nav_bar(args = {})
45
45
  self.navigationController ||= begin
46
46
  self.first_screen = true if self.respond_to?(:first_screen=)
47
- nav = NavigationController.alloc.initWithRootViewController(self)
47
+ nav = (args[:nav_controller] || NavigationController).alloc.initWithRootViewController(self)
48
48
  nav.setModalTransitionStyle(args[:transition_style]) if args[:transition_style]
49
49
  nav.setModalPresentationStyle(args[:presentation_style]) if args[:presentation_style]
50
50
  nav
@@ -42,6 +42,7 @@ module ProMotion
42
42
  args[:animated] = true unless args.has_key?(:animated)
43
43
 
44
44
  if self.modal?
45
+ close_nav_screen args if self.navigationController
45
46
  close_modal_screen args
46
47
 
47
48
  elsif self.navigationController
@@ -144,10 +145,8 @@ module ProMotion
144
145
  else
145
146
  self.navigationController.popViewControllerAnimated(args[:animated])
146
147
  end
148
+ self.navigationController = nil
147
149
  end
148
150
 
149
151
  end
150
152
  end
151
-
152
-
153
-
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "2.0.0.rc3" unless defined?(ProMotion::VERSION)
2
+ VERSION = "2.0.0.rc4" unless defined?(ProMotion::VERSION)
3
3
  end
@@ -21,10 +21,10 @@ module ProMotion
21
21
 
22
22
  self.webview ||= add UIWebView.new, {
23
23
  frame: CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height),
24
- resize: [ :width, :height ],
25
24
  delegate: self,
26
25
  data_detector_types: self.detector_types
27
26
  }
27
+ self.webview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight
28
28
  self.webview.scalesPageToFit = self.scale_to_fit
29
29
  self.webview.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal
30
30
  set_initial_content
@@ -125,14 +125,20 @@ describe "screen properties" do
125
125
 
126
126
  describe "navigation controller behavior" do
127
127
 
128
- it "should have a nav bar" do
129
- @screen.nav_bar?.should == true
128
+ it "should let the instance set the nav_controller" do
129
+ screen = HomeScreen.new nav_bar: true, nav_controller: CustomNavigationController
130
+ screen.on_load
131
+ screen.navigationController.should.be.instance_of CustomNavigationController
130
132
  end
131
133
 
132
134
  it "#navigationController should return a navigation controller" do
133
135
  @screen.navigationController.should.be.instance_of ProMotion::NavigationController
134
136
  end
135
137
 
138
+ it "should have a nav bar" do
139
+ @screen.nav_bar?.should == true
140
+ end
141
+
136
142
  it "have a right bar button item" do
137
143
  @screen.navigationItem.rightBarButtonItem.should.not == nil
138
144
  end
@@ -260,4 +266,5 @@ describe "screen with toolbar" do
260
266
  screen.set_toolbar_button([{title: "Testing Toolbar"}], false)
261
267
  screen.navigationController.toolbarHidden?.should == false
262
268
  end
269
+
263
270
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ProMotion
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc3
4
+ version: 2.0.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-27 00:00:00.000000000 Z
13
+ date: 2014-07-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: methadone