prime_sliding_action 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTZiODViZjkwYWE0ZTI3NTRkMGM0YWViYTBjOGEwZGQ2NDRjN2I2MQ==
4
+ YmEyNTYzMDA2NjdlNTBiMWExNjZhMGE0NjRlODY2OWU1ODY0N2RlMw==
5
5
  data.tar.gz: !binary |-
6
- MGQ0NGQ5ODc5MWU2OGJkZDM4ZGJkMzIwMjhkNTU0OWJhMmU2MjY2Yw==
6
+ YzQ3OWE5NjgyYzAxMDUwMjRjZWUyMmFmMjg0ZmQ5NjdkNjkxNzUxMg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OWYzNDE0NGI0NmFmYTcxMDExNjM2OGU1M2VhYTQ1ODVjY2ZiZDM5MWFhZGJi
10
- YjAzYjk0NmQ4NGQ4Y2U3YmJkZmFhODhkMzRhYzhkNzAxNDRkZjQ5Nzk1YTE5
11
- MWU0ZTJjNGE4YWQwYzI0NDg2MzU0NDdmOTgzYmJmZTVhZGNiZWE=
9
+ ZTBkZDdmNzA4YWM3YWVlZGQ0NDVhNmU4OGU3YjZmZDU0MjZkNzA4NDFhY2Fk
10
+ Njg4YWI5Mzg5YTNkYTc0NDg0YjdiZjUyMjcxYjA5MWRhYTFkMDdmNjAyNDU0
11
+ NWZiNzZiYjQ4YTYzNmUzNTA1YjgxMTFhNTlhNWU1ZjgyMmQ2MDM=
12
12
  data.tar.gz: !binary |-
13
- NmUwYTI5ZDJkOTUwNmQwMGEzNzRkODVhYWU1ZGEyZDhjODhjM2NhMGFhMzRi
14
- NjIzZDY0Njc3ZjYwNjEwMzliYjE2M2I3MzljNzI4YjA0ZTQ3MDgwMmIzNzM2
15
- ZGEyNDQ0Nzc5MzNhMDhjNThjZjMyZGY3MDU2OTNhNGQ5ZmQwYWU=
13
+ NTcwYTA2YTljZmUxYTc4MTMwNzBhYzg0YTZiZWMwMjZiOWExZTk4ZjlhZDRk
14
+ NTNiNWE2MGRjODBkNGVlMDcyZTUzMDQ0N2UzYzM3OGYxMzEzMTBmYmJmMjFh
15
+ ZGQwMzA0NDhjN2UzNWFiNGY3NzM2NGVlM2U4Y2MxODlhMmQwZDI=
data/README.md CHANGED
@@ -8,14 +8,21 @@ Add this line to your application's Gemfile:
8
8
 
9
9
  gem 'prime_sliding_action'
10
10
 
11
- And then execute:
12
-
13
- $ bundle
14
-
15
- Or install it yourself as:
16
-
17
- $ gem install prime_sliding_action
18
-
11
+ ## Usage
12
+
13
+ ```
14
+ class MyCellSection < Prime::Section
15
+ add_sliding_action_button :like,
16
+ text_color: :white,
17
+ background_color: :red,
18
+ title: 'Like',
19
+ action: :action_like
20
+
21
+ def action_like
22
+ puts "Like!"
23
+ end
24
+ end
25
+ ```
19
26
 
20
27
  ## Contributing
21
28
 
@@ -24,3 +31,9 @@ Or install it yourself as:
24
31
  3. Commit your changes (`git commit -am 'Add some feature'`)
25
32
  4. Push to the branch (`git push origin my-new-feature`)
26
33
  5. Create new Pull Request
34
+
35
+ ## Thanks for using PrimeSlidingAction!
36
+
37
+ Hope, you'll enjoy PrimeSlidingAction!
38
+
39
+ Cheers, [Droid Labs](http://droidlabs.pro).
@@ -22,7 +22,7 @@ class SlidingCellView < MPCellWithSection
22
22
  title_color: options[:title_color] || :white,
23
23
  title: options[:title],
24
24
  background_color: options[:background_color] || options[:color] || :red
25
- @section.screen.setup button, styles: styles
25
+ @section.screen.set_options button, styles: styles
26
26
  @sliding_action_buttons_offset += button.width
27
27
  button.on :touch do
28
28
  button.off(:touch) if options[:unbind]
@@ -125,10 +125,10 @@ class SlidingCellView < MPCellWithSection
125
125
  section ? section.container_options[:height] : self.height
126
126
  end
127
127
 
128
- def gestureRecognizer(gestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer: otherGestureRecognizer)
128
+ def gestureRecognizerShouldBegin(gestureRecognizer)
129
129
  if gestureRecognizer.is_a?(UIPanGestureRecognizer)
130
- yVelocity = (gestureRecognizer.velocityInView gestureRecognizer.view).y
131
- yVelocity.abs >= 10
130
+ velocity = (gestureRecognizer.velocityInView gestureRecognizer.view)
131
+ velocity.y.abs < velocity.x.abs
132
132
  else
133
133
  true
134
134
  end
@@ -1,3 +1,3 @@
1
1
  module PrimeSlidingAction
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prime_sliding_action
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Haziev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: motion-prime
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.6
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 0.9.6
55
69
  description: Add sliding action cells support to MotionPrime.
56
70
  email:
57
71
  - gvalmon@gmail.com