ProMotion 1.0.0 → 1.0.1

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.
@@ -6,6 +6,11 @@ module ProMotion
6
6
  s
7
7
  end
8
8
 
9
+ def loadView
10
+ super
11
+ self.send(:on_load) if self.respond_to?(:on_load)
12
+ end
13
+
9
14
  def viewDidLoad
10
15
  super
11
16
  self.view_did_load if self.respond_to?(:view_did_load)
@@ -173,7 +173,7 @@ module ProMotion
173
173
  else
174
174
  if self.respond_to?(:table_data_index)
175
175
  self.table_data_index
176
- elsif self.class.get_indexable
176
+ elsif self.class.respond_to?(:get_indexable) && self.class.get_indexable
177
177
  self.index_from_section_titles
178
178
  else
179
179
  nil
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "1.0.0" unless defined?(ProMotion::VERSION)
2
+ VERSION = "1.0.1" unless defined?(ProMotion::VERSION)
3
3
  end
@@ -8,6 +8,8 @@ class TestTableScreen < ProMotion::TableScreen
8
8
 
9
9
  def on_load
10
10
  self.tap_counter = 0
11
+ set_attributes self.view, { backgroundView: nil, backgroundColor: UIColor.whiteColor }
12
+ set_nav_bar_right_button UIImage.imageNamed("list.png"), action: :return_to_some_other_screen, type: UIBarButtonItemStylePlain
11
13
  end
12
14
 
13
15
  def table_data
@@ -7,6 +7,13 @@ describe "table screens" do
7
7
  @screen.on_load
8
8
  end
9
9
 
10
+ it "should add an image right nav bar button" do
11
+ image = UIImage.imageNamed("list.png")
12
+ # @screen.set_nav_bar_button :right, image: image, action: :return_to_some_other_screen, type: UIBarButtonItemStylePlain
13
+ @screen.navigationItem.rightBarButtonItem.image.class.should == UIImage
14
+ @screen.navigationItem.rightBarButtonItem.image.should == image
15
+ end
16
+
10
17
  it "should display some sections" do
11
18
  @screen.promotion_table_data.sections.should.be.kind_of(Array)
12
19
  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: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-07-15 00:00:00.000000000 Z
14
+ date: 2013-07-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: webstub