motion-screenshots 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/lib/motion/motion-screenshots.rb +11 -1
- data/motion-screenshots.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38f1b9b8b99b23e3f94840539981e9cb7189a7b3
|
4
|
+
data.tar.gz: e892bca6863617110b6913e8591353e102d6b4dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36d7af91fe53a023941defff6a6cf1ee165491aa54414c2eee4a0011e8d57878467bfbda57f529b30c73ff76afb88934731b37bab46cfc074ca17cb9dbc383ec
|
7
|
+
data.tar.gz: 0916cd645857ded0d874f5935a54a3c4b289864503368bf62ec26de97bd89dff55715383efd333d0c8f50acfdf21ebde2b06847352f287aec548653c1de387c9
|
data/README.md
CHANGED
@@ -51,6 +51,8 @@ class AppScreenshots < Motion::Screenshots::Base
|
|
51
51
|
# at some point in the future (i.e. a timer, network calls, etc)
|
52
52
|
# Invoke `#ready!` to take the shot
|
53
53
|
async_screenshot "profile" do
|
54
|
+
ready_delay 3 # delays the screenshot to 3 seconds after ready! is called
|
55
|
+
|
54
56
|
before do
|
55
57
|
App.delegate.table_view_controller.selectRowAtIndexPath(
|
56
58
|
NSIndexPath.indexPathForRow(0, inSection: 1),
|
@@ -58,10 +60,7 @@ class AppScreenshots < Motion::Screenshots::Base
|
|
58
60
|
scrollPosition: UITableViewScrollPositionNone
|
59
61
|
)
|
60
62
|
|
61
|
-
|
62
|
-
Dispatch::Queue.main.after(3) {
|
63
|
-
ready!
|
64
|
-
}
|
63
|
+
ready!
|
65
64
|
end
|
66
65
|
|
67
66
|
# clean-up
|
@@ -72,14 +71,15 @@ class AppScreenshots < Motion::Screenshots::Base
|
|
72
71
|
end
|
73
72
|
```
|
74
73
|
|
75
|
-
Then,
|
74
|
+
Then, after your initial views have appeared, simply let motion-screenshots know when to start the process:
|
76
75
|
|
77
76
|
```ruby
|
78
|
-
class
|
77
|
+
class MyFirstViewController
|
79
78
|
|
80
|
-
def
|
81
|
-
|
79
|
+
def viewDidAppear(animated)
|
80
|
+
super
|
82
81
|
|
82
|
+
# May need to wrap in a Dispatch::Queue.main.async{} block
|
83
83
|
AppScreenshots.start!
|
84
84
|
end
|
85
85
|
end
|
@@ -94,7 +94,17 @@ module Motion
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def ready!
|
97
|
-
@
|
97
|
+
if @delay
|
98
|
+
Dispatch::Queue.main.after(@delay.to_f) {
|
99
|
+
@manager.actionIsReady
|
100
|
+
}
|
101
|
+
else
|
102
|
+
@manager.actionIsReady
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def ready_delay(amount)
|
107
|
+
@delay = amount
|
98
108
|
end
|
99
109
|
|
100
110
|
def to_KSScreenshotAction
|
data/motion-screenshots.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-screenshots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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: 2014-
|
11
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: motion-cocoapods
|