motion-imager 0.2.0 → 0.2.1

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: cfb8660e5b7e2923e6553d2d39c0243cb7cbc37d
4
- data.tar.gz: 45f312075a01c0d77c184fc35fdb80ccfcf08fd6
3
+ metadata.gz: 7f6ffdb37612a43f24afb315def228cfe2b7e761
4
+ data.tar.gz: da6f262e6b29fd841984c0090a48d541a38a70a9
5
5
  SHA512:
6
- metadata.gz: 230ab1063fd9a6ba1f9dc9aad9757d30a778e7f9f41794b0e30af5ebd3e238aad6f1a8a35226fa2ac31d609d36810f7cdcfe6f95921ffa7fd8282a8504e188c7
7
- data.tar.gz: 965d37cd53748ca19469bfa55e2a92480da2b13afc053d91a9aabec68f74129b55a98040df00c0b2f0644152b091c41b15720990bd39683bd8d95abf0c29aace
6
+ metadata.gz: 7a23ab3d66917d90aef50143e4d32b43bd67a0c9aa1b52ddcffc49178d6d58cbd2e71da159df5d484cbf27b06859a689fd6f75dfe03963a7670bc386b4297e1b
7
+ data.tar.gz: 091116b4c9cd3b49672b4ecc23dd716b0216f04203c0a56f6ff0295c477d0d09c67ed863ad92895e3cf71e53be230b6c89338ed32cb416d238b9a0473387dfb0
data/README.md CHANGED
@@ -58,6 +58,18 @@ mi.show
58
58
  mi.dismiss # mi.hide will work too!
59
59
  ```
60
60
 
61
+ Access the lightbox controller:
62
+
63
+ ```ruby
64
+ mi = MotionImager.new({
65
+ image: UIImage.imageNamed('something'),
66
+ presenting_from: WeakRef.new(self),
67
+ })
68
+
69
+ # add subviews to controller view for customization!
70
+ mi.controller
71
+ ```
72
+
61
73
  Documentation for all available options:
62
74
 
63
75
  ```ruby
@@ -71,7 +83,7 @@ Documentation for all available options:
71
83
  # Can also be an instance of NSURL
72
84
  # REQUIRED if not specifying `image`
73
85
  url: 'https://www.google.com/images/srpr/logo11w.png',
74
-
86
+
75
87
  # Placeholder image that will be displayed during the image download time.
76
88
  # Can also be an instance of UIImage
77
89
  # OPTIONAL
@@ -80,19 +92,19 @@ Documentation for all available options:
80
92
  # What view controller to show the lightbox from.
81
93
  # REQUIRED. Should almost ALWAYS be `WeakRef.new(self)`
82
94
  presenting_from: WeakRef.new(self),
83
-
95
+
84
96
  # Two image transitions are supported:
85
97
  # :original - displays the image zooming from it's original position on the screen
86
98
  # :off_screen - slides the image in from off screen.
87
99
  # OPTIONAL. Defaults to `:original`
88
100
  transition: :original,
89
-
101
+
90
102
  # Two modes are supported:
91
103
  # :image - only dislays the image
92
104
  # :alt_text - displays text instead of an image. Requires `text` to be set
93
105
  # OPTIONAL. Defaults to `:image`
94
106
  mode: :image,
95
-
107
+
96
108
  # Sets the text for the image when using mode: :alt_text.
97
109
  # OPTIONAL
98
110
  text: "Some Text",
@@ -102,13 +114,13 @@ Documentation for all available options:
102
114
  # none:, scaled:, blurred:, scaled_blurred:
103
115
  # OPTIONAL. Defaults to :scaled
104
116
  background: :scaled_blurred,
105
-
117
+
106
118
  # The frame of the originating view on the screen.
107
119
  # If set and in :original transition, the full-screen image
108
120
  # will zoom from this location on the screen.
109
121
  # OPTIONAL
110
122
  rect: my_thumbnail.frame,
111
-
123
+
112
124
  # The the superview of the rect you set above.
113
125
  # OPTIONAL
114
126
  view: view
@@ -17,7 +17,7 @@ class MotionImager
17
17
  alias :dismiss :hide
18
18
 
19
19
  def controller
20
- JTSImageViewController.alloc.initWithImageInfo(image_info,
20
+ @jts_controller ||= JTSImageViewController.alloc.initWithImageInfo(image_info,
21
21
  mode: modes[@args[:mode]] || JTSImageViewControllerMode_Image,
22
22
  backgroundStyle: backgrounds[@args[:background]] || JTSImageViewControllerBackgroundOption_Scaled
23
23
  )
@@ -1,3 +1,3 @@
1
1
  module MotionImager
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-imager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rickert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-cocoapods