motion-form 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/project/cells/button_cell.rb +10 -0
- data/lib/project/motion-form.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa3364265fd127938685c9729a9950cf9432f6b0
|
4
|
+
data.tar.gz: 7c88738e889b758d389d07ec1e5e21b08573df56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eff4aa6489cbd5d23fa089cfa1b9f716ada65b6fb63af8ee56903bccffd57839635af6c3a11aaad21aea7b1ed845993fa6b19989a1cd1c1d66b6c4a0d97a2a9e
|
7
|
+
data.tar.gz: 9c6312efb10173df0ed22df66be840b722c55bf048668766a2f1dfeb3b576bce6e88ee94c87eb2457fe56599ad176fb8184ae833d69bd85a4ec09b9cf801c97c
|
data/README.md
CHANGED
@@ -43,6 +43,7 @@ MotionForm.config do |config|
|
|
43
43
|
config.icon_font = UIFont.fontWithName('dscovr', size: 14.0)
|
44
44
|
config.section_header_color = UIColor.blueColor
|
45
45
|
config.section_header_text_color = UIColor.whiteColor
|
46
|
+
config.button_text_color = UIColor.redColor
|
46
47
|
end
|
47
48
|
```
|
48
49
|
|
@@ -23,6 +23,16 @@ class ButtonCell < TextFieldCell
|
|
23
23
|
addGestureRecognizer(tap_recognizer)
|
24
24
|
end
|
25
25
|
|
26
|
+
def label=(label)
|
27
|
+
text_field.attributedPlaceholder = build_highlighted_placeholder(label)
|
28
|
+
end
|
29
|
+
|
30
|
+
def build_highlighted_placeholder(label)
|
31
|
+
NSAttributedString.alloc.initWithString(
|
32
|
+
label,
|
33
|
+
attributes: { NSForegroundColorAttributeName => MotionForm.button_text_color })
|
34
|
+
end
|
35
|
+
|
26
36
|
def tap_recognizer
|
27
37
|
UITapGestureRecognizer.alloc.initWithTarget(self, action: 'tapped:')
|
28
38
|
end
|
data/lib/project/motion-form.rb
CHANGED
@@ -3,7 +3,7 @@ motion_require './cells/text_field_cell'
|
|
3
3
|
|
4
4
|
module MotionForm
|
5
5
|
class << self
|
6
|
-
attr_writer :icon_font, :section_header_color, :section_header_text_color
|
6
|
+
attr_writer :icon_font, :section_header_color, :section_header_text_color, :button_text_color
|
7
7
|
|
8
8
|
def config
|
9
9
|
yield self
|
@@ -51,5 +51,9 @@ module MotionForm
|
|
51
51
|
def section_header_text_color
|
52
52
|
@section_header_text_color || '#eaf0f1'.to_color
|
53
53
|
end
|
54
|
+
|
55
|
+
def button_text_color
|
56
|
+
@button_text_color || '#bdc3c7'.to_color
|
57
|
+
end
|
54
58
|
end
|
55
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Devon Blandin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: motion-keyboard-avoiding
|