motion-form 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/project/motion-form.rb +13 -1
- data/lib/project/views/section_header_view.rb +4 -4
- 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: c6c5f6d6d6e4e1f327cbe637636be8d8ba507e5b
|
4
|
+
data.tar.gz: 2b84ae16300f98d3cb15ceb9d99f8bf38cc7786c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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
|
-
|
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.
|
20
|
-
label.font
|
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.
|
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-
|
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
|