tgios 0.0.8 → 0.0.10

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDlhMzkxZGM3YWM4YjRlZGJlNzU2ODI4NWUxNDI4ODA1NWQ4OGVhNA==
4
+ YjI5MWRlNTljZWVjMDM1MDA2OWVmNDU2Y2ZmNDM5ODUxZGRkNzMzZQ==
5
5
  data.tar.gz: !binary |-
6
- ODZlZjQzOTBiY2QxY2U3OWUyM2JhM2U3MzQ5Mzc3YWRjNGIxMGQ1Nw==
6
+ MmMxNThkMTNkOWZmNzZjN2ZmMTZkYmM1MGMwMjAxMmY2OTIzNjBkYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTk1YzUwZDUwNDk0ZWZkZjZjN2E1OWU5NjYxZjRlNzU1NjRiNjVlNWM3N2Uw
10
- YzQ0YTI3MGVhNDkxZThlYTBkOWEwMDZiNzczNTkxYzBjNTc0NDg0MTkzMTNk
11
- ZTM0YzZhYjQyN2FlN2I1YTA1MGRkYzU4YTNiMDAzMDQxMTVlNjI=
9
+ NThhMzYwNmYxODQ0MjliYTVkNWVkMWU5NWY1YTZmMDQ5OGFjMGM0YmIyZTZl
10
+ NDI0YzE0YzZkMzg2ODg4OTQ1YmE0Mzg2N2EyNGI0ODQ5MDlkNTk1Zjk5Njgy
11
+ MjM1YjRiOWVlYWZhYTJlZGVkYTgxYzhhMzZkYjNlMzk0OTg1Mjg=
12
12
  data.tar.gz: !binary |-
13
- NzAwYjg2MjM0YzQ2ZGU2YTRkYjNiNjE3MjU2MjNmM2VjMDIwNWI5NzI4ODFk
14
- OTc5ZDJhMDIyMmUwOGE5Y2FiZmQ0OGM5MmM3MmUxYjYzZDJjNWEzNjkyOTU5
15
- YmYxMjE0OWRjZGNjYzNhMGM4Y2QyYzAxNWZiMTRiZTZkY2E5YTM=
13
+ MmJkMzUzYTMyNWI4ZTg4M2IwMzRjNjQwMjU3NjM2ZTUzZTZkYzRiODQzMDUy
14
+ MWM4ZDc5MzMwOWIxMDZkYTYwZmZmZWI5NmU3OWMyZmM1OTIxYWQ2MTIwYzI2
15
+ MzMzNmRkYWMxMDIzZThiZGEwMDEwY2Y0ZDI5NWE3YjYzOWZkMTY=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tgios (0.0.8)
4
+ tgios (0.0.10)
5
5
  awesome_print_motion
6
6
  motion-layout
7
7
  plastic_cup (>= 0.1.1)
@@ -34,6 +34,7 @@ module Tgios
34
34
  @events[:update_cell]=->(field_set, cell, index_path) { create_or_update_field(field_set, cell, index_path)}
35
35
  @events[:update_accessory]=->(field_set, cell, index_path, ui_field) { update_accessory_type_or_view(field_set, cell, index_path, ui_field)}
36
36
  @events[:update_cell_height]=->(field_set, index_path) { update_cell_height(field_set, index_path) }
37
+ @contact_buttons = []
37
38
  end
38
39
 
39
40
 
@@ -197,8 +198,29 @@ module Tgios
197
198
  end
198
199
 
199
200
  def update_accessory_type_or_view(field_set, cell, index_path, ui_field)
200
- cell.accessoryType = (field_set[:accessory] || :none).uitablecellaccessory
201
- cell.accessoryView = nil
201
+
202
+ accessory = field_set[:child_index].nil? ? field_set[:accessory] : field_set[:child_field][:accessory]
203
+
204
+ accessory_view = cell.accessoryView
205
+ if accessory == :contact
206
+ if accessory_view && accessory_view.buttonType == :contact.uibuttontype
207
+ contact_button = accessory_view
208
+ else
209
+ contact_button = (@contact_buttons.pop || UIButton.contact)
210
+ cell.accessoryView = contact_button
211
+ end
212
+ unhook(contact_button, :tapped)
213
+ hook(contact_button, :tapped) do
214
+ tableView(@tableView, didSelectRowAtIndexPath:index_path)
215
+ end
216
+ else
217
+ if accessory_view && accessory_view.buttonType == :contact.uibuttontype
218
+ @contact_buttons << accessory_view
219
+ cell.accessoryView = nil
220
+ end
221
+ cell.accessoryType = (accessory || :none).uitablecellaccessory
222
+ cell.accessoryView = nil
223
+ end
202
224
  end
203
225
 
204
226
  def tableView(tableView, didSelectRowAtIndexPath:index_path)
@@ -138,7 +138,7 @@ module Tgios
138
138
  field_set = field_set_at_index_path(index_path)
139
139
  field_set = field_set[:child_field] unless field_set[:child_index].nil?
140
140
  if field_set[:type] == :big_label || field_set[:type] == :checkbox
141
- 20 + 20 * (field_set[:lines] || 2)
141
+ 26 + 19 * (field_set[:lines] || 2)
142
142
  else
143
143
  45
144
144
  end
data/lib/tgios/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tgios
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.10'
3
3
  end
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.8
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - April Tsang