tgios 0.0.26 → 0.0.27
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 +8 -8
- data/Gemfile.lock +1 -1
- data/lib/tgios/ui_table_view_model_list_binding.rb +17 -0
- data/lib/tgios/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGZhNTM4MzNjNzZmMzQzOWI4NjU0YjA5MTQ4NWQxNTc2ZmNjMGZmYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2QyMWIyZDQ0YTljZTNlNWM2NjI3ZmM4OWNjYmY1ZmZmZmYyN2QwNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjMwZmIxNGI3MDQ0NjUyNjA3OGNiYjQ4YTczYTU0N2FmYjY5ZjE3N2JiMDc4
|
10
|
+
MjM3OTZmMWM0OTJhZDUwNzU1NTg5ZDQ3Nzc5ZGZlNzRlYWQ4NGY2NGM0MzI4
|
11
|
+
ODRjZTZlMDdkZjAxZDgyOGI4YjYzY2RiYjczY2ZmNjYzNzczZmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjdmMDVlOTYyZjVlMTZhOThiN2M0MDQ0MmQ3NTdlN2I3NTZmZjJlM2QwYmM0
|
14
|
+
ODFlOGRhNzRhNGFkMzEwODNjNGRkZDlhYTY5OTc5NWVjYjBhMmE1MTJhNzIy
|
15
|
+
NmFjZmFhOGMxZjQ2NjQzZGM1MmM4M2QyNjI4ZDMyNWQ4YzdmMTA=
|
data/Gemfile.lock
CHANGED
@@ -6,6 +6,7 @@ module Tgios
|
|
6
6
|
@events={}
|
7
7
|
@events[:build_cell]=->(cell_identifier, type) { build_cell(cell_identifier, type)}
|
8
8
|
@events[:update_cell]=->(field_set, cell, index_path) { update_field(field_set, cell, index_path)}
|
9
|
+
@events[:update_cell_height]=->(field_set, index_path) { update_cell_height(field_set, index_path) }
|
9
10
|
self
|
10
11
|
|
11
12
|
end
|
@@ -144,9 +145,25 @@ module Tgios
|
|
144
145
|
|
145
146
|
def tableView(tableView, heightForRowAtIndexPath: index_path)
|
146
147
|
field_set = field_set_at_index_path(index_path)
|
148
|
+
@events[:update_cell_height].call(field_set, index_path)
|
149
|
+
end
|
150
|
+
|
151
|
+
def update_cell_height(field_set, index_path)
|
147
152
|
field_set = field_set[:child_field] unless field_set[:child_index].nil?
|
153
|
+
return field_set[:height] if field_set[:height]
|
148
154
|
if field_set[:type] == :big_label || field_set[:type] == :checkbox
|
149
155
|
26 + 19 * (field_set[:lines] || 2)
|
156
|
+
elsif field_set[:type] == :text_view
|
157
|
+
110
|
158
|
+
elsif field_set[:type] == :dynamic_label
|
159
|
+
return 45 if @model.send(field_set[:name]).nil?
|
160
|
+
width = 284
|
161
|
+
width -= 20 unless field_set[:accessory].nil? || field_set[:accessory] == :none
|
162
|
+
width -= 94 if field_set[:show_label]
|
163
|
+
height = @model.send(field_set[:name]).sizeWithFont(UIFont.systemFontOfSize(14),
|
164
|
+
constrainedToSize: [width, 9999],
|
165
|
+
lineBreakMode: UILineBreakModeCharacterWrap).height + 20
|
166
|
+
[height, 45].max
|
150
167
|
else
|
151
168
|
45
|
152
169
|
end
|
data/lib/tgios/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tgios
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- April Tsang
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sugarcube
|