ProMotion 0.7.6 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -36,6 +36,13 @@ end
36
36
 
37
37
  Featured on the RubyMotion blog: [http://blog.rubymotion.com/post/50523137515/introducing-promotion-a-full-featured-rubymotion](http://blog.rubymotion.com/post/50523137515/introducing-promotion-a-full-featured-rubymotion)
38
38
 
39
+ ## New: Version 1.0 is on its way!
40
+
41
+ Go check out the [version-1.0](https://github.com/clearsightstudio/ProMotion/tree/version-1.0) branch --
42
+ it's got some great improvements and cleaner source code. Although it's not completely ready to launch,
43
+ we recommend trying it out.
44
+
45
+
39
46
  **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
40
47
 
41
48
  - [ProMotion ](#promotion-)
@@ -126,7 +133,7 @@ Create a Gemfile and add the following lines:
126
133
 
127
134
  ```ruby
128
135
  source 'https://rubygems.org'
129
- gem "ProMotion", "~> 0.7.5"
136
+ gem "ProMotion", "~> 0.7.7"
130
137
  ```
131
138
 
132
139
  Run `bundle install` in Terminal to install ProMotion.
@@ -19,7 +19,7 @@ module ProMotion
19
19
  self.send("#{k}=", v) if self.respond_to?("#{k}=")
20
20
  end
21
21
 
22
- self.add_nav_bar if args[:nav_bar]
22
+ self.add_nav_bar(args) if args[:nav_bar]
23
23
  self.navigationController.toolbarHidden = !args[:toolbar] unless args[:toolbar].nil?
24
24
  self.on_init if self.respond_to?(:on_init)
25
25
  self.table_setup if self.respond_to?(:table_setup)
@@ -133,12 +133,27 @@ module ProMotion
133
133
  trigger_action(cell[:action], cell[:arguments]) if cell[:action]
134
134
  end
135
135
 
136
+ def tableView(table_view, editingStyleForRowAtIndexPath: index_path)
137
+ UITableViewCellEditingStyleNone
138
+ end
139
+
136
140
  def tableView(tableView, commitEditingStyle:editing_style, forRowAtIndexPath:index_path)
137
141
  if editing_style == UITableViewCellEditingStyleDelete
138
142
  delete_cell(index_path)
139
143
  end
140
144
  end
141
145
 
146
+ def tableView(tableView, sectionForSectionIndexTitle:title, atIndex:index)
147
+ return index unless ["{search}", UITableViewIndexSearch].include?(self.table_data_index[0])
148
+
149
+ if index == 0
150
+ tableView.setContentOffset(CGPointZero, animated:false)
151
+ NSNotFound
152
+ else
153
+ index-1
154
+ end
155
+ end
156
+
142
157
  def deleteRowsAtIndexPaths(indexPaths, withRowAnimation:animation)
143
158
  PM.logger.warn "ProMotion expects you to use 'delete_cell(index_paths, animation)'' instead of 'deleteRowsAtIndexPaths(indexPaths, withRowAnimation:animation)'."
144
159
  delete_cell(indexPaths, animation)
@@ -1,3 +1,3 @@
1
1
  module ProMotion
2
- VERSION = "0.7.6" unless defined?(ProMotion::VERSION)
2
+ VERSION = "0.7.8" unless defined?(ProMotion::VERSION)
3
3
  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: 0.7.6
4
+ version: 0.7.8
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-06-14 00:00:00.000000000 Z
14
+ date: 2013-07-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: motion-stump