motion-form 0.3.2 → 0.4.0

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: ba1907aa4c09a83695a9b0a92c24dca85e46f35f
4
- data.tar.gz: 0242c8d48deb053b54178ec5c38ccc2985f4642e
3
+ metadata.gz: a6bd42abc43d04185da76e9b3b8155e66e3bcbf2
4
+ data.tar.gz: 3d356e286fb649efe437a0a54c7105a9cef21b82
5
5
  SHA512:
6
- metadata.gz: 264b0177a1c541eaa1f478afdc979df956867fabb99a323cf9453b31fc273cecc26688e35bce9b5f5f73859a5c859f196bf2926c340f2a5a5b0fdd7016a50c1c
7
- data.tar.gz: 8357c057a4be201fae2ccc34988a940f05d49cb512ce4fd6616e3540b4b455c793bf9d150c0219a89f7411366636d08cb459649f5b1714d045f53a7817d4157f
6
+ metadata.gz: ae7c9d463b1ff1de5b945744c4f4b8301b7b5719046650502eba5dc035510ace9f441b79a5dbccf293eaa9550c69821e0ee5b3bd000025dccae074c8b46eb51e
7
+ data.tar.gz: d37c7cca9a011af1f9daa58463dc620dd8e25736d15496186b9b2965e8a1017bd05167b70368dcf4f6f4500de09b3c424801aecd4a3b8db9de70035fe43d1a68
data/README.md CHANGED
@@ -27,7 +27,7 @@ form = MotionForm.form_for(view) do |form|
27
27
  section.input :pinterest, icon: :pinterest
28
28
  section.input :twitter, icon: :twitter
29
29
  section.input :website, icon: :website
30
- section.text :bio, icon: :info
30
+ section.text :bio, placeholder: 'Write a short bio...'
31
31
 
32
32
  section.button :submit, action: submit
33
33
  end
@@ -36,6 +36,10 @@ class TextFieldCell < BaseCell
36
36
  def label=(label)
37
37
  end
38
38
 
39
+ def placeholder=(placeholder)
40
+ text_view.placeholder = placeholder
41
+ end
42
+
39
43
  def secure=(secure)
40
44
  end
41
45
 
@@ -45,9 +49,8 @@ class TextFieldCell < BaseCell
45
49
 
46
50
  def text_view
47
51
  @text_view ||= SZTextView.alloc.init.tap do |text_view|
48
- text_view.font = UIFont.fontWithName('HelveticaNeue-Light', size: 14.0)
49
- text_view.placeholder = 'Write a short bio'
50
- text_view.delegate = self
52
+ text_view.font = UIFont.fontWithName('HelveticaNeue-Light', size: 14.0)
53
+ text_view.delegate = self
51
54
  end
52
55
  end
53
56
  alias_method :text_field, :text_view
@@ -9,4 +9,10 @@ class TextFieldRow < TextInputRow
9
9
  def height
10
10
  100
11
11
  end
12
+
13
+ def update_cell(cell)
14
+ super
15
+
16
+ cell.placeholder = options.fetch(:placeholder, 'Write something...')
17
+ end
12
18
  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.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devon Blandin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-keyboard-avoiding