motion-floating-action-button 0.0.3 → 0.0.4

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: 21f77174714fce7c67752d5b3dfad72ea42f2123
4
- data.tar.gz: d10f0b0ed15dd568fe61dfc284fe06d81a0c5dfa
3
+ metadata.gz: b07f02f811524ca544cd6f3ea71a11b1878c763a
4
+ data.tar.gz: 269f7d9697f0786c1ac876be0835605e6741f660
5
5
  SHA512:
6
- metadata.gz: 6d503b15e9d35bad03375d7827b89bd9ce9ce79dc3735e3b946cc1c75818a963e982ca2961cb74ab31b0535676b0b58c1000447b46f694ac09fdd049c84626e2
7
- data.tar.gz: cfe183e4a5746ebfa72dfee433ffc4dc4833ebaf6565726ce2fa88605834993de6cbc9dd3d9edb9773bd08268af06044df1d7a8d6878fb6acb92bf65bf3458b3
6
+ metadata.gz: 55766bc202653234d9d77037da1acd795f90c538a5ec456dbd2222744a9b022eee08fa9d23527762a521a83559e9578cd1364bb22c83b41cdc70a4d7c90b7255
7
+ data.tar.gz: 27b4a145637bce7c5c2bafa3b78ef3e5e7e53e47db744bbb34406b1fe5dd6a6e5c86c9c68d2916b7950d2996d5514cd3ce8c893ec74e4aefdf7b6521957d0650
data/README.md CHANGED
@@ -26,6 +26,7 @@ scroll_view = UITableView.new # haven't played with the scroll view option myse
26
26
  pressed_image: rmq.image.resource('icons/plus'),
27
27
  scroll_view: scroll_view, #optional
28
28
  navigation_bar: nav_bar, #optional
29
+ delegate: self
29
30
  )
30
31
 
31
32
  # Older way but should still work
@@ -33,7 +34,7 @@ scroll_view = UITableView.new # haven't played with the scroll view option myse
33
34
  floating_frame: CGRectMake(device.width*3/4, device.height/2, device.width*1/4, device.height/2),
34
35
  normal_image: rmq.image.resource('icons/plus'), # or UIImage.imageNamed('plus')
35
36
  pressed_image: rmq.image.resource('icons/plus-pressed'), # or UIImage.imageNamed('plus-pressed')
36
- delegate: self # Needed if you want to call method of a class with your button
37
+ delegate: self
37
38
  })
38
39
 
39
40
  @addButton.imageArray = ["Facebook", "Twitter", "Google Plus", "Linked in"]
@@ -41,3 +42,11 @@ scroll_view = UITableView.new # haven't played with the scroll view option myse
41
42
 
42
43
  rmq.append(@addButton)
43
44
  ```
45
+
46
+ __do something after a menu item is pressed__
47
+
48
+ ``` ruby
49
+ def didSelectMenuOptionAtIndex(index)
50
+ puts index
51
+ end
52
+ ```
@@ -2,7 +2,7 @@ module MotionFloatingActionButton
2
2
 
3
3
  module_function
4
4
 
5
- def new( floating_frame,
5
+ def new( floating_frame,
6
6
  options
7
7
  )
8
8
 
@@ -10,6 +10,7 @@ module MotionFloatingActionButton
10
10
  pressed_image = options[:pressed_image] || UIImage.imageNamed('plus')
11
11
  navigation_bar = options[:navigation_bar]
12
12
  scroll_view = options[:scroll_view]
13
+ delegate = options[:delegate]
13
14
 
14
15
  if scroll_view && navigation_bar
15
16
  addButton = VCFloatingActionButton.alloc.initWithFrame(floating_frame,
@@ -36,6 +37,7 @@ module MotionFloatingActionButton
36
37
  andPressedImage: pressed_image
37
38
  )
38
39
  end
40
+ addButton.delegate = delegate
39
41
 
40
42
  addButton
41
43
  end
@@ -47,10 +49,11 @@ module MotionFloatingActionButton
47
49
  @normal_image = args[:normal_image]
48
50
  @pressed_image = args[:pressed_image]
49
51
  @navigation_bar = args[:navigation_bar]
52
+ @delegate = args[:delegate]
50
53
 
51
54
  # addButton = VCFloatingActionButton.alloc.initWithFrame(@floating_frame, normalImage: @normal_image, andPressedImage: @pressed_image) #, withScrollview: UITableView.new)
52
55
  addButton = VCFloatingActionButton.alloc.initWithFrame(@floating_frame, normalImage: @normal_image, andPressedImage: @pressed_image, andNavigationBar: @navigation_bar)
53
-
56
+ addButton = delegate
54
57
  addButton
55
58
  end
56
59
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-floating-action-button
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Sutevski