motion-form 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e0b0b39d5e8a5cf433f524a477bf7ca3f04ef31
4
- data.tar.gz: a689dbf3679b8725d52bc978d9264794c853bf3b
3
+ metadata.gz: c6c5f6d6d6e4e1f327cbe637636be8d8ba507e5b
4
+ data.tar.gz: 2b84ae16300f98d3cb15ceb9d99f8bf38cc7786c
5
5
  SHA512:
6
- metadata.gz: 6240ecd1b5189c6623f5e88e20d33e34750a67ff9aa39a1048f4193c875f0719a36aee5ffe57f60de0acff35e051e93c0001d26f40f09634bd6934f06603649c
7
- data.tar.gz: d979704d5683e4ccba8cf5d326f195e7d967f2ee89dd415264cf140d5d16d762fb2892b00dc20812e2021a25c291dc9bbd4749b4dae2783ae1d4523a2a297f0c
6
+ metadata.gz: d1a2a7dce932d0d586463dc1dfee0d15fd9ee5aa6e01786b7d5cb7f24d6f0a6ccac175a28e3e5460f362df46a1786287a90f04201c89c073a95d03f264428431
7
+ data.tar.gz: 9fb5fd09fa085ce140d180fc566c71752fa70087d35f7f6a4f633ecaa6a6663b56271a724844b76c6a9706ffb220d09f255372dcd25b37ce08655fbdd9c16ada
data/README.md CHANGED
@@ -36,6 +36,16 @@ def push_password_controller
36
36
  end
37
37
  ```
38
38
 
39
+ ### Configuration
40
+
41
+ ```ruby
42
+ MotionForm.config do |config|
43
+ config.icon_font = UIFont.fontWithName('dscovr', size: 14.0)
44
+ config.section_header_color = UIColor.blueColor
45
+ config.section_header_text_color = UIColor.whiteColor
46
+ end
47
+ ```
48
+
39
49
  ## Installation
40
50
 
41
51
  Add this line to your application's Gemfile:
@@ -3,7 +3,7 @@ motion_require './cells/text_field_cell'
3
3
 
4
4
  module MotionForm
5
5
  class << self
6
- attr_accessor :icon_font
6
+ attr_writer :icon_font, :section_header_color, :section_header_text_color
7
7
 
8
8
  def config
9
9
  yield self
@@ -31,5 +31,17 @@ module MotionForm
31
31
  def included_cells
32
32
  [TextFieldCell, ButtonCell]
33
33
  end
34
+
35
+ def icon_font
36
+ @icon_font || UIFont.fontWithName('dscovr', size: 14.0)
37
+ end
38
+
39
+ def section_header_color
40
+ @section_header_color || UIColor.redColor
41
+ end
42
+
43
+ def section_header_text_color
44
+ @section_header_text_color || UIColor.whiteColor
45
+ end
34
46
  end
35
47
  end
@@ -13,11 +13,11 @@ class SectionHeaderView < UIView
13
13
 
14
14
  def section_title
15
15
  @section_title ||= PaddedLabel.alloc.initWithFrame(bounds).tap do |label|
16
- label.padding = 10
17
- label.backgroundColor = UIColor.redColor
18
16
  label.adjustsFontSizeToFitWidth = true
19
- label.textColor = UIColor.whiteColor
20
- label.font = UIFont.fontWithName('Helvetica Neue', size: 20.0)
17
+ label.backgroundColor = MotionForm.section_header_color
18
+ label.font = UIFont.fontWithName('Helvetica Neue', size: 20.0)
19
+ label.padding = 10
20
+ label.textColor = MotionForm.section_header_text_color
21
21
  end
22
22
  end
23
23
  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.2
4
+ version: 0.0.3
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-07-29 00:00:00.000000000 Z
11
+ date: 2013-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-keyboard-avoiding