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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66e50570ed58cf1ae93083737014c30a1a93fd52
4
- data.tar.gz: 15622ad5748a3688273a4d15eea204dcb4e2384a
3
+ metadata.gz: aa3364265fd127938685c9729a9950cf9432f6b0
4
+ data.tar.gz: 7c88738e889b758d389d07ec1e5e21b08573df56
5
5
  SHA512:
6
- metadata.gz: 9497e6398e3cb0fdc5d549752365fe3a0a89de191333d0e8ff16ac2072f33b35fc5812e28763a32ec6dab4f1404e35f96d261474edbe46aba888cfdee0bfa406
7
- data.tar.gz: c63d225eab258ffaef7f06b3e6f9423eb87a8c12c8928d2f3c8355530bcb41c1c08cc64bd0438760c4780180725ed9db589d3ce4a8389b260ebae133a0fd1ec4
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
@@ -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.6
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-07 00:00:00.000000000 Z
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