formotion 1.5.1 → 1.6
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 +6 -14
- data/Formotion.gemspec +1 -1
- data/examples/KitchenSink/Gemfile +3 -0
- data/examples/KitchenSink/Rakefile +4 -1
- data/lib/formotion/controller/form_controller.rb +1 -1
- data/lib/formotion/form/form.rb +6 -2
- data/lib/formotion/patch/ui_text_view_placeholder.rb +1 -0
- data/lib/formotion/row/row_cell_builder.rb +9 -0
- data/lib/formotion/row_type/check_row.rb +1 -1
- data/lib/formotion/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZGUzZTRiODVlMmE3MGY2YjRiNGIzNTBiZjQ2MDI5ZTA3ODBiNzRhZTFmNGFl
|
10
|
-
ZjYwZmQ2NDg4YTMzMDMyZTljZGQ3ZTNkMjc3OTA2OWUxNjVjNWVhOTI3MTQ0
|
11
|
-
NjY2YmQ5ZmE0NGU1NWZlMWI4MTNmMDk1MGRhNGNjZDU0ZDNjZDI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ODE0MDE1OWU3NzEwMTliNzA1MGIzMzE3NWU0MjIxZGFjYzIwMTg0NjE4ZGIx
|
14
|
-
OWY1ZjlmMmY3YzhiNjg3ZTZiYmYxYTY0MWM5OWViNDE0MGM4MDY0ZDg2MzRj
|
15
|
-
YTEyNTc3ODA2MTAzNzhkOWQ2NjYzZTBmODQ2MzMyMjQyYmYxOTE=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3407c939ef975c1f7e97164c26689e0110507891
|
4
|
+
data.tar.gz: 996472e335ea5b2be05e62fccc4499402e21b6a0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ac0469bebf08738e7ec88465b6b72fce94625f02b65eb5815f85650a5671046266f90beee6100f6cf16d8849ebcd6100eb58f9c74d23ac2b669238de29a233c5
|
7
|
+
data.tar.gz: e16aeb3fbd30d8407bb19b7bd102b04b90274c2f1540056d110371bfbab3a4709ee0afb33838267ebf4b214b16a2772b0b6e460471e8fd808903d10e37cc6948
|
data/Formotion.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.require_paths = ["lib"]
|
16
16
|
s.license = 'MIT'
|
17
17
|
|
18
|
-
s.add_dependency "bubble-wrap", "~> 1.
|
18
|
+
s.add_dependency "bubble-wrap", "~> 1.4.0"
|
19
19
|
s.add_dependency "motion-require", "~> 0.0.3"
|
20
20
|
s.add_development_dependency 'rake'
|
21
21
|
end
|
@@ -1,7 +1,10 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
$:.unshift("/Library/RubyMotion/lib")
|
3
3
|
require 'motion/project'
|
4
|
-
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'bundler'
|
7
|
+
Bundler.require :default
|
5
8
|
|
6
9
|
Motion::Project::App.setup do |app|
|
7
10
|
# Use `rake config' to see complete project settings.
|
@@ -60,7 +60,7 @@ module Formotion
|
|
60
60
|
|
61
61
|
# Subview Methods
|
62
62
|
def push_subform(form)
|
63
|
-
@subform_controller =
|
63
|
+
@subform_controller = self.class.alloc.initWithForm(form)
|
64
64
|
|
65
65
|
if self.navigationController
|
66
66
|
self.navigationController.pushViewController(@subform_controller, animated: true)
|
data/lib/formotion/form/form.rb
CHANGED
@@ -104,10 +104,14 @@ module Formotion
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def row(key)
|
107
|
+
found = nil
|
107
108
|
each_row do |row|
|
108
|
-
|
109
|
+
if row.key == key
|
110
|
+
found = row
|
111
|
+
break
|
112
|
+
end
|
109
113
|
end
|
110
|
-
|
114
|
+
found
|
111
115
|
end
|
112
116
|
|
113
117
|
#########################
|
@@ -34,6 +34,7 @@ class UITextView
|
|
34
34
|
|
35
35
|
if (@shouldDrawPlaceholder)
|
36
36
|
self.placeholder_color.set
|
37
|
+
self.font ||= UIFont.systemFontOfSize(17) # ios7 seems to have a bug where font of uitextview isn't set by default
|
37
38
|
self.placeholder.drawInRect(placeholder_rect, withFont:self.font)
|
38
39
|
end
|
39
40
|
end
|
@@ -7,6 +7,7 @@
|
|
7
7
|
#################
|
8
8
|
module Formotion
|
9
9
|
class RowCellBuilder
|
10
|
+
extend BW::KVO
|
10
11
|
|
11
12
|
# PARAMS row.is_a? Formotion::Row
|
12
13
|
# RETURNS [cell configured to that row, a UITextField for that row if applicable or nil]
|
@@ -16,8 +17,16 @@ module Formotion
|
|
16
17
|
cell = UITableViewCell.alloc.initWithStyle(row.object.cell_style, reuseIdentifier:row.reuse_identifier)
|
17
18
|
|
18
19
|
cell.accessoryType = cell.editingAccessoryType = UITableViewCellAccessoryNone
|
20
|
+
|
19
21
|
cell.textLabel.text = row.title
|
22
|
+
observe(row, "title") do |old_value, new_value|
|
23
|
+
cell.textLabel.text = new_value
|
24
|
+
end
|
25
|
+
|
20
26
|
cell.detailTextLabel.text = row.subtitle
|
27
|
+
observe(row, "subtitle") do |old_value, new_value|
|
28
|
+
cell.detailTextLabel.text = new_value
|
29
|
+
end
|
21
30
|
|
22
31
|
edit_field = row.object.build_cell(cell)
|
23
32
|
|
data/lib/formotion/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formotion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clay Allsopp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bubble-wrap
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: motion-require
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: Making iOS Forms insanely great with RubyMotion
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- examples/FormModel/app/users_controller.rb
|
79
79
|
- examples/FormModel/spec/main_spec.rb
|
80
80
|
- examples/KitchenSink/.gitignore
|
81
|
+
- examples/KitchenSink/Gemfile
|
81
82
|
- examples/KitchenSink/README.md
|
82
83
|
- examples/KitchenSink/Rakefile
|
83
84
|
- examples/KitchenSink/app/app_delegate.rb
|
@@ -222,17 +223,17 @@ require_paths:
|
|
222
223
|
- lib
|
223
224
|
required_ruby_version: !ruby/object:Gem::Requirement
|
224
225
|
requirements:
|
225
|
-
- -
|
226
|
+
- - '>='
|
226
227
|
- !ruby/object:Gem::Version
|
227
228
|
version: '0'
|
228
229
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
230
|
requirements:
|
230
|
-
- -
|
231
|
+
- - '>='
|
231
232
|
- !ruby/object:Gem::Version
|
232
233
|
version: '0'
|
233
234
|
requirements: []
|
234
235
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.0.
|
236
|
+
rubygems_version: 2.0.3
|
236
237
|
signing_key:
|
237
238
|
specification_version: 4
|
238
239
|
summary: Making iOS Forms insanely great with RubyMotion
|