tgios 0.0.7 → 0.0.8

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
- Y2JiNDk5ZThjZDgxYTA4MzdjY2VhYzFkYmM3NjBkZDQ5YjRhNzlhMQ==
4
+ MDlhMzkxZGM3YWM4YjRlZGJlNzU2ODI4NWUxNDI4ODA1NWQ4OGVhNA==
5
5
  data.tar.gz: !binary |-
6
- ZjZhM2ExZTRhYWVmMjkyZTFjNTg3MTg3NGYyMTM1NDBjYmZiNzdkOQ==
6
+ ODZlZjQzOTBiY2QxY2U3OWUyM2JhM2U3MzQ5Mzc3YWRjNGIxMGQ1Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTM1YWU4MjM4MmVjZDNjMDQ5NDA0N2RlMDNlZmRkMTkzODY1ZGMxNmQ4ZmU3
10
- NDllM2Y3MTQxNDk2M2Y2ODk3YjMxNWEwNDExMjgzMDk2Y2ZlMTkyYWRmYjdl
11
- MjJlMGM2ODkyMTk2MTExZTc1MjVhZmNkYWVmOTRkYTIxMmUwNTg=
9
+ YTk1YzUwZDUwNDk0ZWZkZjZjN2E1OWU5NjYxZjRlNzU1NjRiNjVlNWM3N2Uw
10
+ YzQ0YTI3MGVhNDkxZThlYTBkOWEwMDZiNzczNTkxYzBjNTc0NDg0MTkzMTNk
11
+ ZTM0YzZhYjQyN2FlN2I1YTA1MGRkYzU4YTNiMDAzMDQxMTVlNjI=
12
12
  data.tar.gz: !binary |-
13
- OTkzMjBiNWU3Y2UzNzMyNGQyZGZlMjliNjQ2NmNjZmFlMDIxY2JlNjExYmE3
14
- Njk3MTVhZGZhYWMwM2E4ODYzODRiNzdiY2M2MmYzNjI3ODIyZGEyNzJiMGZj
15
- YjBkMGI4MDZhOGIxMmM5NDUyMWQ3NTZlODA2NmI2MmM2ZDU5MzA=
13
+ NzAwYjg2MjM0YzQ2ZGU2YTRkYjNiNjE3MjU2MjNmM2VjMDIwNWI5NzI4ODFk
14
+ OTc5ZDJhMDIyMmUwOGE5Y2FiZmQ0OGM5MmM3MmUxYjYzZDJjNWEzNjkyOTU5
15
+ YmYxMjE0OWRjZGNjYzNhMGM4Y2QyYzAxNWZiMTRiZTZkY2E5YTM=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tgios (0.0.7)
4
+ tgios (0.0.8)
5
5
  awesome_print_motion
6
6
  motion-layout
7
7
  plastic_cup (>= 0.1.1)
@@ -12,18 +12,26 @@ module Tgios
12
12
  end
13
13
 
14
14
  def load
15
- image = UIImage.imageWithContentsOfFile(self.file_path)
15
+ image = get_image
16
16
  if image.nil?
17
17
  AFMotion::Image.get(@url) do |result|
18
18
  image = result.object
19
19
  @events[:image_loaded].call(image, result.success?) unless @events.nil? || @events[:image_loaded].nil?
20
- NSFileManager.defaultManager.createFileAtPath(self.file_path, contents: UIImageJPEGRepresentation(image, 0.95), attributes:nil)
20
+ save_image(image)
21
21
  end
22
22
  else
23
23
  @events[:image_loaded].call(image, true) unless @events.nil? || @events[:image_loaded].nil?
24
24
  end
25
25
  end
26
26
 
27
+ def get_image
28
+ UIImage.imageWithContentsOfFile(file_path)
29
+ end
30
+
31
+ def save_image(image)
32
+ NSFileManager.defaultManager.createFileAtPath(self.file_path, contents: UIImageJPEGRepresentation(image, 0.95), attributes:nil)
33
+ end
34
+
27
35
  def self.base_path
28
36
  @base_path ||= "#{NSTemporaryDirectory()}web/"
29
37
  end
@@ -66,6 +66,10 @@ module Tgios
66
66
  end
67
67
  end
68
68
 
69
+ def tableView(tableView, willDisplayCell:cell, forRowAtIndexPath:indexPath)
70
+ @events[:reach_bottom].call unless @events[:reach_bottom].nil? || indexPath.row < @list.length - 1
71
+ end
72
+
69
73
  def onPrepareForRelease
70
74
  @events=nil
71
75
  @list=nil
@@ -91,7 +91,7 @@ module Tgios
91
91
  cell.detailTextLabel.numberOfLines = 0
92
92
  cell.detailTextLabel.backgroundColor = :clear.uicolor
93
93
  cell.textLabel.numberOfLines = 0
94
- elsif type == :label_only
94
+ elsif type == :label_only || type == :array
95
95
  cell.detailTextLabel.textColor = UIColor.colorWithRed(0, green: 122.0/255.0, blue: 1.0, alpha: 1.0)
96
96
  else
97
97
  cell.textLabel.numberOfLines = 2
data/lib/tgios/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tgios
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
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.7
4
+ version: 0.0.8
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-02-18 00:00:00.000000000 Z
12
+ date: 2014-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sugarcube