├── .github
└── FUNDING.yml
├── .gitignore
├── Glimpse.podspec
├── Glimpse.xcworkspace
├── contents.xcworkspacedata
├── xcshareddata
│ └── Glimpse.xccheckout
└── xcuserdata
│ └── wesscope.xcuserdatad
│ └── UserInterfaceState.xcuserstate
├── Glimpse
├── Glimpse.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── wesscope.xcuserdatad
│ │ └── xcschemes
│ │ ├── Glimpse.xcscheme
│ │ └── xcschememanagement.plist
└── Glimpse
│ ├── Glimpse-Prefix.pch
│ ├── Glimpse.h
│ ├── Glimpse.m
│ ├── GlimpseAssetWriter.h
│ └── GlimpseAssetWriter.m
├── GlimpseExample
├── GlimpseExample.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── wesscope.xcuserdatad
│ │ └── xcschemes
│ │ ├── GlimpseExample.xcscheme
│ │ └── xcschememanagement.plist
└── GlimpseExample
│ ├── Default-568h@2x.png
│ ├── Default.png
│ ├── Default@2x.png
│ ├── GEAppDelegate.h
│ ├── GEAppDelegate.m
│ ├── GEExampleViewController.h
│ ├── GEExampleViewController.m
│ ├── GlimpseExample-Info.plist
│ ├── GlimpseExample-Prefix.pch
│ ├── en.lproj
│ └── InfoPlist.strings
│ └── main.m
├── LICENSE
└── README.md
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: wess
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | build/*
3 | *.pbxuser
4 | !default.pbxuser
5 | *.mode1v3
6 | !default.mode1v3
7 | *.mode2v3
8 | !default.mode2v3
9 | *.perspectivev3
10 | !default.perspectivev3
11 | UserInterfaceState.xcuserstate
12 | !default.xcworkspace
13 | profile
14 | *.moved-aside
15 |
16 | .DS_Store
17 | Builds/*
18 | DTS*
19 | # OS X Finder
20 | # Xcode per-user config
21 | *.mode1
22 | *.perspective
23 | xcuserdata
24 | # Build products
25 | build/
26 | *.o
27 | *.LinkFileList
28 | *.hmap
29 | # Automatic backup files
30 | *~.nib/
31 | *.swp
32 | *~
33 | *.dat
34 | *.dep
35 | # Cocoapods
36 | Pods
37 | Podfile.lock
38 | .gitmodules
39 |
--------------------------------------------------------------------------------
/Glimpse.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'Glimpse'
3 | s.version = '1.0'
4 | s.summary = 'Glimpse is a simple library that allows you to create videos from UIViews.'
5 | s.description = <<-DESC
6 | Glimpse is a simple library that allows you to create videos from UIViews. It records animations and actions as they happen by taking screen shots of a UIView in a series and then creating a quicktime video and saving it to your app’s document folder.
7 | DESC
8 |
9 | s.homepage = 'https://github.com/wess/Glimpse'
10 | s.license = { :type => 'MIT', :file => 'LICENSE' }
11 | s.author = { 'Wess Cope' => 'wcope@me.com' }
12 | s.source = { :git => 'https://github.com/wess/Glimpse.git', :tag => s.version.to_s }
13 |
14 | s.ios.deployment_target = '8.0'
15 |
16 | s.source_files = 'Glimpse/Glimpse/*.{h,m}'
17 |
18 |
19 | s.public_header_files = 'Glimpse/Glimpse/Glimpse.h'
20 | s.frameworks = 'MobileCoreServices', 'AssetsLibrary','CoreVideo','QuartzCore','UIKit'
21 | end
22 |
--------------------------------------------------------------------------------
/Glimpse.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Glimpse.xcworkspace/xcshareddata/Glimpse.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | D79C2A4E-EDAF-4F3A-A21D-FC1293ABBB3A
9 | IDESourceControlProjectName
10 | Glimpse
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | DDBD9C62-976A-43A1-B63A-24535D63730B
14 | ssh://github.com/wess/Glimpse.git
15 |
16 | IDESourceControlProjectPath
17 | Glimpse.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | DDBD9C62-976A-43A1-B63A-24535D63730B
21 | ..
22 |
23 | IDESourceControlProjectURL
24 | ssh://github.com/wess/Glimpse.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | DDBD9C62-976A-43A1-B63A-24535D63730B
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | DDBD9C62-976A-43A1-B63A-24535D63730B
36 | IDESourceControlWCCName
37 | Glimpse
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Glimpse.xcworkspace/xcuserdata/wesscope.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wess/Glimpse/17f56bf2679d660261dd83e88fcee4bed6515d6f/Glimpse.xcworkspace/xcuserdata/wesscope.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Glimpse/Glimpse.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 08477B8D1700C75700873619 /* GlimpseAssetWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 08477B8C1700C75700873619 /* GlimpseAssetWriter.m */; };
11 | 08F243791700928300DFFB78 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243781700928300DFFB78 /* Foundation.framework */; };
12 | 08F2437E1700928300DFFB78 /* Glimpse.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 08F2437D1700928300DFFB78 /* Glimpse.h */; };
13 | 08F243801700928300DFFB78 /* Glimpse.m in Sources */ = {isa = PBXBuildFile; fileRef = 08F2437F1700928300DFFB78 /* Glimpse.m */; };
14 | 08F243B4170092E100DFFB78 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243AF170092E100DFFB78 /* AssetsLibrary.framework */; };
15 | 08F243B5170092E100DFFB78 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243B0170092E100DFFB78 /* AVFoundation.framework */; };
16 | 08F243B6170092E100DFFB78 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243B1170092E100DFFB78 /* CoreVideo.framework */; };
17 | 08F243B7170092E100DFFB78 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243B2170092E100DFFB78 /* QuartzCore.framework */; };
18 | 08F243B8170092E100DFFB78 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243B3170092E100DFFB78 /* UIKit.framework */; };
19 | 08F243C0170094A300DFFB78 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243BF170094A300DFFB78 /* MobileCoreServices.framework */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 08F243731700928300DFFB78 /* CopyFiles */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "include/${PRODUCT_NAME}";
27 | dstSubfolderSpec = 16;
28 | files = (
29 | 08F2437E1700928300DFFB78 /* Glimpse.h in CopyFiles */,
30 | );
31 | runOnlyForDeploymentPostprocessing = 0;
32 | };
33 | /* End PBXCopyFilesBuildPhase section */
34 |
35 | /* Begin PBXFileReference section */
36 | 08477B8B1700C75700873619 /* GlimpseAssetWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlimpseAssetWriter.h; sourceTree = ""; };
37 | 08477B8C1700C75700873619 /* GlimpseAssetWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GlimpseAssetWriter.m; sourceTree = ""; };
38 | 08F243751700928300DFFB78 /* libGlimpse.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libGlimpse.a; sourceTree = BUILT_PRODUCTS_DIR; };
39 | 08F243781700928300DFFB78 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
40 | 08F2437C1700928300DFFB78 /* Glimpse-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Glimpse-Prefix.pch"; sourceTree = ""; };
41 | 08F2437D1700928300DFFB78 /* Glimpse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Glimpse.h; sourceTree = ""; };
42 | 08F2437F1700928300DFFB78 /* Glimpse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Glimpse.m; sourceTree = ""; };
43 | 08F243AF170092E100DFFB78 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
44 | 08F243B0170092E100DFFB78 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
45 | 08F243B1170092E100DFFB78 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
46 | 08F243B2170092E100DFFB78 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
47 | 08F243B3170092E100DFFB78 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
48 | 08F243BF170094A300DFFB78 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
49 | /* End PBXFileReference section */
50 |
51 | /* Begin PBXFrameworksBuildPhase section */
52 | 08F243721700928300DFFB78 /* Frameworks */ = {
53 | isa = PBXFrameworksBuildPhase;
54 | buildActionMask = 2147483647;
55 | files = (
56 | 08F243C0170094A300DFFB78 /* MobileCoreServices.framework in Frameworks */,
57 | 08F243B4170092E100DFFB78 /* AssetsLibrary.framework in Frameworks */,
58 | 08F243B5170092E100DFFB78 /* AVFoundation.framework in Frameworks */,
59 | 08F243B6170092E100DFFB78 /* CoreVideo.framework in Frameworks */,
60 | 08F243B7170092E100DFFB78 /* QuartzCore.framework in Frameworks */,
61 | 08F243B8170092E100DFFB78 /* UIKit.framework in Frameworks */,
62 | 08F243791700928300DFFB78 /* Foundation.framework in Frameworks */,
63 | );
64 | runOnlyForDeploymentPostprocessing = 0;
65 | };
66 | /* End PBXFrameworksBuildPhase section */
67 |
68 | /* Begin PBXGroup section */
69 | 08477B8A1700C74300873619 /* AssetWriter */ = {
70 | isa = PBXGroup;
71 | children = (
72 | 08477B8B1700C75700873619 /* GlimpseAssetWriter.h */,
73 | 08477B8C1700C75700873619 /* GlimpseAssetWriter.m */,
74 | );
75 | name = AssetWriter;
76 | sourceTree = "";
77 | };
78 | 08F2436C1700928300DFFB78 = {
79 | isa = PBXGroup;
80 | children = (
81 | 08F2437A1700928300DFFB78 /* Glimpse */,
82 | 08F243771700928300DFFB78 /* Frameworks */,
83 | 08F243761700928300DFFB78 /* Products */,
84 | );
85 | sourceTree = "";
86 | };
87 | 08F243761700928300DFFB78 /* Products */ = {
88 | isa = PBXGroup;
89 | children = (
90 | 08F243751700928300DFFB78 /* libGlimpse.a */,
91 | );
92 | name = Products;
93 | sourceTree = "";
94 | };
95 | 08F243771700928300DFFB78 /* Frameworks */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 08F243BF170094A300DFFB78 /* MobileCoreServices.framework */,
99 | 08F243AF170092E100DFFB78 /* AssetsLibrary.framework */,
100 | 08F243B0170092E100DFFB78 /* AVFoundation.framework */,
101 | 08F243B1170092E100DFFB78 /* CoreVideo.framework */,
102 | 08F243B2170092E100DFFB78 /* QuartzCore.framework */,
103 | 08F243B3170092E100DFFB78 /* UIKit.framework */,
104 | 08F243781700928300DFFB78 /* Foundation.framework */,
105 | );
106 | name = Frameworks;
107 | sourceTree = "";
108 | };
109 | 08F2437A1700928300DFFB78 /* Glimpse */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 08477B8A1700C74300873619 /* AssetWriter */,
113 | 08F2437D1700928300DFFB78 /* Glimpse.h */,
114 | 08F2437F1700928300DFFB78 /* Glimpse.m */,
115 | 08F2437B1700928300DFFB78 /* Supporting Files */,
116 | );
117 | path = Glimpse;
118 | sourceTree = "";
119 | };
120 | 08F2437B1700928300DFFB78 /* Supporting Files */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 08F2437C1700928300DFFB78 /* Glimpse-Prefix.pch */,
124 | );
125 | name = "Supporting Files";
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | 08F243741700928300DFFB78 /* Glimpse */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = 08F243831700928300DFFB78 /* Build configuration list for PBXNativeTarget "Glimpse" */;
134 | buildPhases = (
135 | 08F243711700928300DFFB78 /* Sources */,
136 | 08F243721700928300DFFB78 /* Frameworks */,
137 | 08F243731700928300DFFB78 /* CopyFiles */,
138 | );
139 | buildRules = (
140 | );
141 | dependencies = (
142 | );
143 | name = Glimpse;
144 | productName = Glimpse;
145 | productReference = 08F243751700928300DFFB78 /* libGlimpse.a */;
146 | productType = "com.apple.product-type.library.static";
147 | };
148 | /* End PBXNativeTarget section */
149 |
150 | /* Begin PBXProject section */
151 | 08F2436D1700928300DFFB78 /* Project object */ = {
152 | isa = PBXProject;
153 | attributes = {
154 | LastUpgradeCheck = 0460;
155 | ORGANIZATIONNAME = "Wess Cope";
156 | };
157 | buildConfigurationList = 08F243701700928300DFFB78 /* Build configuration list for PBXProject "Glimpse" */;
158 | compatibilityVersion = "Xcode 3.2";
159 | developmentRegion = English;
160 | hasScannedForEncodings = 0;
161 | knownRegions = (
162 | en,
163 | );
164 | mainGroup = 08F2436C1700928300DFFB78;
165 | productRefGroup = 08F243761700928300DFFB78 /* Products */;
166 | projectDirPath = "";
167 | projectRoot = "";
168 | targets = (
169 | 08F243741700928300DFFB78 /* Glimpse */,
170 | );
171 | };
172 | /* End PBXProject section */
173 |
174 | /* Begin PBXSourcesBuildPhase section */
175 | 08F243711700928300DFFB78 /* Sources */ = {
176 | isa = PBXSourcesBuildPhase;
177 | buildActionMask = 2147483647;
178 | files = (
179 | 08F243801700928300DFFB78 /* Glimpse.m in Sources */,
180 | 08477B8D1700C75700873619 /* GlimpseAssetWriter.m in Sources */,
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | };
184 | /* End PBXSourcesBuildPhase section */
185 |
186 | /* Begin XCBuildConfiguration section */
187 | 08F243811700928300DFFB78 /* Debug */ = {
188 | isa = XCBuildConfiguration;
189 | buildSettings = {
190 | ALWAYS_SEARCH_USER_PATHS = NO;
191 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
192 | CLANG_CXX_LIBRARY = "libc++";
193 | CLANG_ENABLE_OBJC_ARC = YES;
194 | CLANG_WARN_CONSTANT_CONVERSION = YES;
195 | CLANG_WARN_EMPTY_BODY = YES;
196 | CLANG_WARN_ENUM_CONVERSION = YES;
197 | CLANG_WARN_INT_CONVERSION = YES;
198 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
199 | COPY_PHASE_STRIP = NO;
200 | GCC_C_LANGUAGE_STANDARD = gnu99;
201 | GCC_DYNAMIC_NO_PIC = NO;
202 | GCC_OPTIMIZATION_LEVEL = 0;
203 | GCC_PREPROCESSOR_DEFINITIONS = (
204 | "DEBUG=1",
205 | "$(inherited)",
206 | );
207 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
208 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
209 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
210 | GCC_WARN_UNUSED_VARIABLE = YES;
211 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
212 | ONLY_ACTIVE_ARCH = YES;
213 | SDKROOT = iphoneos;
214 | };
215 | name = Debug;
216 | };
217 | 08F243821700928300DFFB78 /* Release */ = {
218 | isa = XCBuildConfiguration;
219 | buildSettings = {
220 | ALWAYS_SEARCH_USER_PATHS = NO;
221 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
222 | CLANG_CXX_LIBRARY = "libc++";
223 | CLANG_ENABLE_OBJC_ARC = YES;
224 | CLANG_WARN_CONSTANT_CONVERSION = YES;
225 | CLANG_WARN_EMPTY_BODY = YES;
226 | CLANG_WARN_ENUM_CONVERSION = YES;
227 | CLANG_WARN_INT_CONVERSION = YES;
228 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
229 | COPY_PHASE_STRIP = YES;
230 | GCC_C_LANGUAGE_STANDARD = gnu99;
231 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
232 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
233 | GCC_WARN_UNUSED_VARIABLE = YES;
234 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
235 | SDKROOT = iphoneos;
236 | VALIDATE_PRODUCT = YES;
237 | };
238 | name = Release;
239 | };
240 | 08F243841700928300DFFB78 /* Debug */ = {
241 | isa = XCBuildConfiguration;
242 | buildSettings = {
243 | DSTROOT = /tmp/Glimpse.dst;
244 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
245 | GCC_PREFIX_HEADER = "Glimpse/Glimpse-Prefix.pch";
246 | OTHER_LDFLAGS = "-ObjC";
247 | PRODUCT_NAME = "$(TARGET_NAME)";
248 | SKIP_INSTALL = YES;
249 | };
250 | name = Debug;
251 | };
252 | 08F243851700928300DFFB78 /* Release */ = {
253 | isa = XCBuildConfiguration;
254 | buildSettings = {
255 | DSTROOT = /tmp/Glimpse.dst;
256 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
257 | GCC_PREFIX_HEADER = "Glimpse/Glimpse-Prefix.pch";
258 | OTHER_LDFLAGS = "-ObjC";
259 | PRODUCT_NAME = "$(TARGET_NAME)";
260 | SKIP_INSTALL = YES;
261 | };
262 | name = Release;
263 | };
264 | /* End XCBuildConfiguration section */
265 |
266 | /* Begin XCConfigurationList section */
267 | 08F243701700928300DFFB78 /* Build configuration list for PBXProject "Glimpse" */ = {
268 | isa = XCConfigurationList;
269 | buildConfigurations = (
270 | 08F243811700928300DFFB78 /* Debug */,
271 | 08F243821700928300DFFB78 /* Release */,
272 | );
273 | defaultConfigurationIsVisible = 0;
274 | defaultConfigurationName = Release;
275 | };
276 | 08F243831700928300DFFB78 /* Build configuration list for PBXNativeTarget "Glimpse" */ = {
277 | isa = XCConfigurationList;
278 | buildConfigurations = (
279 | 08F243841700928300DFFB78 /* Debug */,
280 | 08F243851700928300DFFB78 /* Release */,
281 | );
282 | defaultConfigurationIsVisible = 0;
283 | defaultConfigurationName = Release;
284 | };
285 | /* End XCConfigurationList section */
286 | };
287 | rootObject = 08F2436D1700928300DFFB78 /* Project object */;
288 | }
289 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse.xcodeproj/xcuserdata/wesscope.xcuserdatad/xcschemes/Glimpse.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse.xcodeproj/xcuserdata/wesscope.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Glimpse.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 08F243741700928300DFFB78
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse/Glimpse-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'Glimpse' target in the 'Glimpse' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse/Glimpse.h:
--------------------------------------------------------------------------------
1 | //
2 | // Glimpse.h
3 | // Glimpse
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | /**
13 | `Glimpse` is a class that allows recording of UIViews and their interactions and animations.
14 | */
15 |
16 | /**
17 | Callback block that is called when a recording session is complete.
18 | **/
19 | typedef void(^GlimpseCompletedCallback)(NSURL *fileOuputURL);
20 |
21 | @interface Glimpse : NSObject
22 | ///--------------------------------------------------------------------------------------------------------
23 | /// @name Main class for creating new and controlling recordings.
24 | ///--------------------------------------------------------------------------------------------------------
25 |
26 | /**
27 | Starts recording a view and defines completion callback.
28 |
29 | @param view UIView to record.
30 |
31 | @param block Block that is called when recording has been stopped.
32 |
33 | **/
34 | - (void)startRecordingView:(UIView *)view onCompletion:(GlimpseCompletedCallback)block;
35 |
36 | /**
37 | Just an alias.
38 | **/
39 | - (void)startRecordingView:(UIView *)view withCallback:(GlimpseCompletedCallback)callback;
40 |
41 | /**
42 | Stops recording a previously defined UIView.
43 | **/
44 | - (void)stop;
45 | @end
46 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse/Glimpse.m:
--------------------------------------------------------------------------------
1 | //
2 | // Glimpse.m
3 | // Glimpse
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import "Glimpse.h"
10 | #import
11 | #import "GlimpseAssetWriter.h"
12 |
13 | @interface Glimpse()
14 | {
15 | dispatch_queue_t _queue;
16 | dispatch_source_t _source;
17 | }
18 | @property (copy, nonatomic) GlimpseCompletedCallback callback;
19 | @property (strong, nonatomic) UIView *sourceView;
20 | @property (strong, nonatomic) GlimpseAssetWriter *writer;
21 | @property (copy, nonatomic) NSURL *fileOutput;
22 |
23 | - (UIImage *)imageFromView:(UIView *)view;
24 | @end
25 |
26 | @implementation Glimpse
27 |
28 | static double const GlimpseFramesPerSecond = 24.0;
29 |
30 | - (id)init
31 | {
32 | self = [super init];
33 | if (self)
34 | {
35 | self.writer = [[GlimpseAssetWriter alloc] init];
36 | }
37 | return self;
38 | }
39 |
40 | - (void)startRecordingView:(UIView *)view withCallback:(GlimpseCompletedCallback)callback
41 | {
42 | [self startRecordingView:view onCompletion:callback];
43 | }
44 |
45 | - (void)startRecordingView:(UIView *)view onCompletion:(GlimpseCompletedCallback)block
46 | {
47 | self.sourceView = view;
48 | self.callback = block;
49 | self.writer.size = view.bounds.size;
50 |
51 | self.writer.framesPerSecond = GlimpseFramesPerSecond;
52 |
53 | self.writer.startDate = [NSDate date];
54 |
55 | __weak typeof(self) weakSelf = self;
56 | _queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
57 | _source = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, _queue);
58 | dispatch_source_set_timer(_source, dispatch_time(DISPATCH_TIME_NOW, 0), (1.0/GlimpseFramesPerSecond) * NSEC_PER_SEC, 0 * NSEC_PER_SEC);
59 | dispatch_source_set_event_handler(_source, ^{
60 |
61 | dispatch_sync(dispatch_get_main_queue(), ^{
62 | UIImage *viewImage = [weakSelf imageFromView:weakSelf.sourceView];
63 | [weakSelf.writer writeFrameWithImage:[viewImage copy]];
64 | });
65 | });
66 | dispatch_resume(_source);
67 | }
68 |
69 | - (void)stop
70 | {
71 | dispatch_source_cancel(_source);
72 |
73 | self.writer.endDate = [NSDate date];
74 |
75 | [self.writer writeVideoFromImageFrames:^(NSURL *outputPath) {
76 | self.callback(outputPath);
77 | }];
78 | }
79 |
80 | - (UIImage *)imageFromView:(UIView *)view
81 | {
82 | UIGraphicsBeginImageContextWithOptions(view.frame.size , YES , 0 );
83 |
84 | if ([view respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)]) {
85 | [view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
86 | } else {
87 | [view.layer renderInContext:UIGraphicsGetCurrentContext()];
88 | }
89 | UIImage *rasterizedView = UIGraphicsGetImageFromCurrentImageContext();
90 | UIGraphicsEndImageContext();
91 |
92 | return rasterizedView;
93 | }
94 | @end
95 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse/GlimpseAssetWriter.h:
--------------------------------------------------------------------------------
1 | //
2 | // GlimpseAssetWriter.h
3 | // Glimpse
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | /**
14 | `GlimpseAssetWriter` is a class used to handle writing captured screen shots to video.
15 | **/
16 |
17 | @class GlimpseAssetWriter;
18 |
19 | @interface GlimpseAssetWriter : NSObject
20 | ///----------------------------------------------------------------------------------------------------------
21 | /// @name Wrapper to AVAssetWriter to simplifiy converting a collection of images to a video.
22 | ///----------------------------------------------------------------------------------------------------------
23 |
24 | /**
25 | Defines the size of the recording area, defaults to UIScreen's bounds.
26 | **/
27 | @property (readwrite, nonatomic) CGSize size;
28 |
29 | /**
30 | Frames per second for playback.
31 | **/
32 | @property (assign, nonatomic) NSInteger framesPerSecond;
33 |
34 | /**
35 | Path of the file that the video is being written to.
36 | **/
37 | @property (readonly, nonatomic) NSURL *fileOutputURL;
38 |
39 | /**
40 | When recording started.
41 | **/
42 | @property (strong, nonatomic) NSDate *startDate;
43 |
44 | /**
45 | When recording stopped.
46 | **/
47 | @property (strong, nonatomic) NSDate *endDate;
48 |
49 | /**
50 | Creates a new video frame based of the image that is passed, added to the frame buffering.
51 |
52 | @param image Image to be written to video.
53 | **/
54 | - (void)writeFrameWithImage:(UIImage *)image;
55 |
56 | /**
57 | Writes images in frame buffer to video in sequence, then fires callback when complete.
58 |
59 | @param callback Block called when all image frames have been written to video.
60 | **/
61 | - (void)writeVideoFromImageFrames:(void(^)(NSURL *outputPath))callback;
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/Glimpse/Glimpse/GlimpseAssetWriter.m:
--------------------------------------------------------------------------------
1 | //
2 | // GlimpseAssetWriter.m
3 | // Glimpse
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import "GlimpseAssetWriter.h"
10 | #import
11 |
12 | @interface GlimpseAssetWriter()
13 | {
14 | CFAbsoluteTime _timeOfFirstFrame;
15 | CFTimeInterval _timestamp;
16 | int32_t _frameRate;
17 | uint64_t _frameCount;
18 | dispatch_queue_t _queue;
19 |
20 | }
21 |
22 | @property (strong, nonatomic) NSMutableArray *frameBuffer;
23 | @property (strong, nonatomic) AVAssetWriter *writer;
24 | @property (strong, nonatomic) AVAssetWriterInput *input;
25 | @property (strong, nonatomic) AVAssetWriterInputPixelBufferAdaptor *adapter;
26 | @property (strong, nonatomic) CADisplayLink *displayLink;
27 |
28 | @end
29 |
30 | @implementation GlimpseAssetWriter
31 | @synthesize fileOutputURL = _fileOutputURL;
32 | @synthesize writer = _writer;
33 | @synthesize displayLink = _displayLink;
34 |
35 | static NSString *const GlimpseAssetWriterQueueName = @"com.Glimpse.asset.writer.queue";
36 |
37 | - (id)init
38 | {
39 | self = [super init];
40 | if (self)
41 | {
42 | self.size = [[UIScreen mainScreen] bounds].size;
43 | self.framesPerSecond = 24;
44 | self.frameBuffer = [[NSMutableArray alloc] init];
45 |
46 | _frameRate = (int32_t)self.framesPerSecond;
47 | _queue = dispatch_queue_create([GlimpseAssetWriterQueueName cStringUsingEncoding:NSUTF8StringEncoding], 0);
48 | }
49 | return self;
50 | }
51 |
52 | - (NSURL *)createFileOutputURL
53 | {
54 | NSString *documentDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
55 | NSTimeInterval timestamp = [[NSDate date] timeIntervalSince1970];
56 | NSString *filename = [NSString stringWithFormat:@"glimpse_%08x.mov", (int)timestamp];
57 | NSString *path = [NSString stringWithFormat:@"%@/%@", documentDirectory, filename];
58 | NSFileManager *fileManager = [NSFileManager defaultManager];
59 |
60 | if([fileManager fileExistsAtPath:path])
61 | [fileManager removeItemAtPath:path error:nil];
62 |
63 | NSLog(@"OUTPUT: %@", path);
64 | return [NSURL fileURLWithPath:path];
65 | }
66 |
67 | - (AVAssetWriter *)writer
68 | {
69 | if(_writer)
70 | return _writer;
71 |
72 | _fileOutputURL = [self createFileOutputURL];
73 |
74 | NSError *error = nil;
75 | _writer = [[AVAssetWriter alloc] initWithURL:self.fileOutputURL fileType:AVFileTypeQuickTimeMovie error:&error];
76 | NSAssert(error == nil, error.debugDescription);
77 |
78 | NSDictionary *settings = @{
79 | AVVideoCodecKey: AVVideoCodecH264,
80 | AVVideoWidthKey: @(self.size.width),
81 | AVVideoHeightKey: @(self.size.height)
82 | };
83 |
84 | self.input = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:settings];
85 |
86 | NSDictionary *attributes = @{
87 | (NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32ARGB),
88 | (NSString *)kCVPixelBufferWidthKey: @(self.size.width),
89 | (NSString *)kCVPixelBufferHeightKey: @(self.size.height)
90 | };
91 | self.adapter = [AVAssetWriterInputPixelBufferAdaptor assetWriterInputPixelBufferAdaptorWithAssetWriterInput:self.input sourcePixelBufferAttributes:attributes];
92 |
93 | [self.writer addInput:self.input];
94 |
95 | self.input.expectsMediaDataInRealTime = YES;
96 |
97 | _timeOfFirstFrame = CFAbsoluteTimeGetCurrent();
98 |
99 | return _writer;
100 | }
101 |
102 | - (CVPixelBufferRef)pixelBufferForImage:(UIImage *)image
103 | {
104 | CGImageRef cgImage = image.CGImage;
105 |
106 | NSDictionary *options = @{
107 | (NSString *)kCVPixelBufferCGImageCompatibilityKey: @(YES),
108 | (NSString *)kCVPixelBufferCGBitmapContextCompatibilityKey: @(YES)
109 | };
110 | CVPixelBufferRef buffer = NULL;
111 | CVPixelBufferCreate(kCFAllocatorDefault, CGImageGetWidth(cgImage), CGImageGetHeight(cgImage), kCVPixelFormatType_32ARGB, (__bridge CFDictionaryRef)options, &buffer);
112 |
113 | CVPixelBufferLockBaseAddress(buffer, 0);
114 |
115 | void *data = CVPixelBufferGetBaseAddress(buffer);
116 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
117 | CGContextRef context = CGBitmapContextCreate(data, CGImageGetWidth(cgImage), CGImageGetHeight(cgImage), 8, CVPixelBufferGetBytesPerRow(buffer), colorSpace, (kCGBitmapAlphaInfoMask & kCGImageAlphaNoneSkipFirst));
118 | CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, CGImageGetWidth(cgImage), CGImageGetHeight(cgImage)), cgImage);
119 |
120 | CGColorSpaceRelease(colorSpace);
121 | CGContextRelease(context);
122 |
123 | CVPixelBufferUnlockBaseAddress(buffer, 0);
124 |
125 | return buffer;
126 | }
127 |
128 | - (void)writeFrameWithImage:(UIImage *)image
129 | {
130 | [self.frameBuffer addObject:image];
131 | }
132 |
133 | - (void)writeVideoFromImageFrames:(void(^)(NSURL *outputPath))callback
134 | {
135 | [self.writer startWriting];
136 | [self.writer startSessionAtSourceTime:kCMTimeZero];
137 |
138 | __block CVPixelBufferRef buffer = [self pixelBufferForImage:self.frameBuffer[0]];
139 | BOOL success = [self.adapter appendPixelBuffer:buffer withPresentationTime:kCMTimeZero];
140 |
141 | NSTimeInterval startTimeDiff = [self.startDate timeIntervalSinceNow];
142 | NSTimeInterval endTimeDiff = [self.endDate timeIntervalSinceNow];
143 | NSTimeInterval sleepOffset = ((endTimeDiff - startTimeDiff) / self.frameBuffer.count);
144 |
145 | [NSThread sleepForTimeInterval:sleepOffset];
146 |
147 | NSParameterAssert(success);
148 | NSParameterAssert(buffer);
149 |
150 | if(buffer)
151 | CVBufferRelease(buffer);
152 |
153 | dispatch_async(_queue, ^{
154 | __block int i = 0;
155 | [self.frameBuffer enumerateObjectsUsingBlock:^(UIImage *image, NSUInteger idx, BOOL *stop) {
156 | if(self.input.readyForMoreMediaData)
157 | {
158 | i++;
159 | CMTime present = CMTimeMake(i , _frameRate);
160 |
161 | buffer = [self pixelBufferForImage:image];
162 | BOOL result = [self.adapter appendPixelBuffer:buffer withPresentationTime:present];
163 | if(!result)
164 | NSLog(@"Failed to write image: %@", [self.writer error]);
165 |
166 | if(buffer)
167 | CVPixelBufferRelease(buffer);
168 | }
169 | else
170 | {
171 | NSLog(@"Input error");
172 | i--;
173 | }
174 |
175 | [NSThread sleepForTimeInterval:sleepOffset];
176 | }];
177 |
178 | [self.input markAsFinished];
179 | [self.writer finishWritingWithCompletionHandler:^{
180 |
181 | if(callback)
182 | callback(self.fileOutputURL);
183 | }];
184 | });
185 | }
186 |
187 |
188 | @end
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 08F24393170092A700DFFB78 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F24392170092A700DFFB78 /* UIKit.framework */; };
11 | 08F24395170092A700DFFB78 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F24394170092A700DFFB78 /* Foundation.framework */; };
12 | 08F24397170092A700DFFB78 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F24396170092A700DFFB78 /* CoreGraphics.framework */; };
13 | 08F2439D170092A700DFFB78 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 08F2439B170092A700DFFB78 /* InfoPlist.strings */; };
14 | 08F2439F170092A700DFFB78 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 08F2439E170092A700DFFB78 /* main.m */; };
15 | 08F243A3170092A700DFFB78 /* GEAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 08F243A2170092A700DFFB78 /* GEAppDelegate.m */; };
16 | 08F243A5170092A700DFFB78 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 08F243A4170092A700DFFB78 /* Default.png */; };
17 | 08F243A7170092A700DFFB78 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 08F243A6170092A700DFFB78 /* Default@2x.png */; };
18 | 08F243A9170092A700DFFB78 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 08F243A8170092A700DFFB78 /* Default-568h@2x.png */; };
19 | 08F243BC1700930B00DFFB78 /* libGlimpse.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243B91700930B00DFFB78 /* libGlimpse.a */; };
20 | 08F243BD1700930B00DFFB78 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243BA1700930B00DFFB78 /* AVFoundation.framework */; };
21 | 08F243BE1700930B00DFFB78 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243BB1700930B00DFFB78 /* QuartzCore.framework */; };
22 | 08F243C21700AD3400DFFB78 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243C11700AD3400DFFB78 /* AssetsLibrary.framework */; };
23 | 08F243C41700AD4700DFFB78 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243C31700AD4700DFFB78 /* MobileCoreServices.framework */; };
24 | 08F243C61700AD6A00DFFB78 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243C51700AD6A00DFFB78 /* CoreVideo.framework */; };
25 | 08F243C81700AD7D00DFFB78 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08F243C71700AD7D00DFFB78 /* CoreMedia.framework */; };
26 | 08F243CB1700AE8E00DFFB78 /* GEExampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 08F243CA1700AE8E00DFFB78 /* GEExampleViewController.m */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXFileReference section */
30 | 08F2438F170092A700DFFB78 /* GlimpseExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GlimpseExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 08F24392170092A700DFFB78 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
32 | 08F24394170092A700DFFB78 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
33 | 08F24396170092A700DFFB78 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
34 | 08F2439A170092A700DFFB78 /* GlimpseExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GlimpseExample-Info.plist"; sourceTree = ""; };
35 | 08F2439C170092A700DFFB78 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
36 | 08F2439E170092A700DFFB78 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
37 | 08F243A0170092A700DFFB78 /* GlimpseExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GlimpseExample-Prefix.pch"; sourceTree = ""; };
38 | 08F243A1170092A700DFFB78 /* GEAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GEAppDelegate.h; sourceTree = ""; };
39 | 08F243A2170092A700DFFB78 /* GEAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GEAppDelegate.m; sourceTree = ""; };
40 | 08F243A4170092A700DFFB78 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; };
41 | 08F243A6170092A700DFFB78 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; };
42 | 08F243A8170092A700DFFB78 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
43 | 08F243B91700930B00DFFB78 /* libGlimpse.a */ = {isa = PBXFileReference; lastKnownFileType = file; name = libGlimpse.a; path = "../Glimpse/build/Release-iphoneos/libGlimpse.a"; sourceTree = ""; };
44 | 08F243BA1700930B00DFFB78 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
45 | 08F243BB1700930B00DFFB78 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
46 | 08F243C11700AD3400DFFB78 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
47 | 08F243C31700AD4700DFFB78 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
48 | 08F243C51700AD6A00DFFB78 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
49 | 08F243C71700AD7D00DFFB78 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
50 | 08F243C91700AE8E00DFFB78 /* GEExampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GEExampleViewController.h; sourceTree = ""; };
51 | 08F243CA1700AE8E00DFFB78 /* GEExampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GEExampleViewController.m; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 08F2438C170092A700DFFB78 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | 08F243C81700AD7D00DFFB78 /* CoreMedia.framework in Frameworks */,
60 | 08F243C61700AD6A00DFFB78 /* CoreVideo.framework in Frameworks */,
61 | 08F243C41700AD4700DFFB78 /* MobileCoreServices.framework in Frameworks */,
62 | 08F243C21700AD3400DFFB78 /* AssetsLibrary.framework in Frameworks */,
63 | 08F243BC1700930B00DFFB78 /* libGlimpse.a in Frameworks */,
64 | 08F243BD1700930B00DFFB78 /* AVFoundation.framework in Frameworks */,
65 | 08F243BE1700930B00DFFB78 /* QuartzCore.framework in Frameworks */,
66 | 08F24393170092A700DFFB78 /* UIKit.framework in Frameworks */,
67 | 08F24395170092A700DFFB78 /* Foundation.framework in Frameworks */,
68 | 08F24397170092A700DFFB78 /* CoreGraphics.framework in Frameworks */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | /* End PBXFrameworksBuildPhase section */
73 |
74 | /* Begin PBXGroup section */
75 | 08F24386170092A700DFFB78 = {
76 | isa = PBXGroup;
77 | children = (
78 | 08F24398170092A700DFFB78 /* GlimpseExample */,
79 | 08F24391170092A700DFFB78 /* Frameworks */,
80 | 08F24390170092A700DFFB78 /* Products */,
81 | );
82 | sourceTree = "";
83 | };
84 | 08F24390170092A700DFFB78 /* Products */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 08F2438F170092A700DFFB78 /* GlimpseExample.app */,
88 | );
89 | name = Products;
90 | sourceTree = "";
91 | };
92 | 08F24391170092A700DFFB78 /* Frameworks */ = {
93 | isa = PBXGroup;
94 | children = (
95 | 08F243C71700AD7D00DFFB78 /* CoreMedia.framework */,
96 | 08F243C51700AD6A00DFFB78 /* CoreVideo.framework */,
97 | 08F243C31700AD4700DFFB78 /* MobileCoreServices.framework */,
98 | 08F243C11700AD3400DFFB78 /* AssetsLibrary.framework */,
99 | 08F243B91700930B00DFFB78 /* libGlimpse.a */,
100 | 08F243BA1700930B00DFFB78 /* AVFoundation.framework */,
101 | 08F243BB1700930B00DFFB78 /* QuartzCore.framework */,
102 | 08F24392170092A700DFFB78 /* UIKit.framework */,
103 | 08F24394170092A700DFFB78 /* Foundation.framework */,
104 | 08F24396170092A700DFFB78 /* CoreGraphics.framework */,
105 | );
106 | name = Frameworks;
107 | sourceTree = "";
108 | };
109 | 08F24398170092A700DFFB78 /* GlimpseExample */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 08F243A1170092A700DFFB78 /* GEAppDelegate.h */,
113 | 08F243A2170092A700DFFB78 /* GEAppDelegate.m */,
114 | 08F24399170092A700DFFB78 /* Supporting Files */,
115 | 08F243C91700AE8E00DFFB78 /* GEExampleViewController.h */,
116 | 08F243CA1700AE8E00DFFB78 /* GEExampleViewController.m */,
117 | );
118 | path = GlimpseExample;
119 | sourceTree = "";
120 | };
121 | 08F24399170092A700DFFB78 /* Supporting Files */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 08F2439A170092A700DFFB78 /* GlimpseExample-Info.plist */,
125 | 08F2439B170092A700DFFB78 /* InfoPlist.strings */,
126 | 08F2439E170092A700DFFB78 /* main.m */,
127 | 08F243A0170092A700DFFB78 /* GlimpseExample-Prefix.pch */,
128 | 08F243A4170092A700DFFB78 /* Default.png */,
129 | 08F243A6170092A700DFFB78 /* Default@2x.png */,
130 | 08F243A8170092A700DFFB78 /* Default-568h@2x.png */,
131 | );
132 | name = "Supporting Files";
133 | sourceTree = "";
134 | };
135 | /* End PBXGroup section */
136 |
137 | /* Begin PBXNativeTarget section */
138 | 08F2438E170092A700DFFB78 /* GlimpseExample */ = {
139 | isa = PBXNativeTarget;
140 | buildConfigurationList = 08F243AC170092A700DFFB78 /* Build configuration list for PBXNativeTarget "GlimpseExample" */;
141 | buildPhases = (
142 | 08F2438B170092A700DFFB78 /* Sources */,
143 | 08F2438C170092A700DFFB78 /* Frameworks */,
144 | 08F2438D170092A700DFFB78 /* Resources */,
145 | );
146 | buildRules = (
147 | );
148 | dependencies = (
149 | );
150 | name = GlimpseExample;
151 | productName = GlimpseExample;
152 | productReference = 08F2438F170092A700DFFB78 /* GlimpseExample.app */;
153 | productType = "com.apple.product-type.application";
154 | };
155 | /* End PBXNativeTarget section */
156 |
157 | /* Begin PBXProject section */
158 | 08F24387170092A700DFFB78 /* Project object */ = {
159 | isa = PBXProject;
160 | attributes = {
161 | CLASSPREFIX = GE;
162 | LastUpgradeCheck = 0460;
163 | ORGANIZATIONNAME = "Wess Cope";
164 | };
165 | buildConfigurationList = 08F2438A170092A700DFFB78 /* Build configuration list for PBXProject "GlimpseExample" */;
166 | compatibilityVersion = "Xcode 3.2";
167 | developmentRegion = English;
168 | hasScannedForEncodings = 0;
169 | knownRegions = (
170 | en,
171 | );
172 | mainGroup = 08F24386170092A700DFFB78;
173 | productRefGroup = 08F24390170092A700DFFB78 /* Products */;
174 | projectDirPath = "";
175 | projectRoot = "";
176 | targets = (
177 | 08F2438E170092A700DFFB78 /* GlimpseExample */,
178 | );
179 | };
180 | /* End PBXProject section */
181 |
182 | /* Begin PBXResourcesBuildPhase section */
183 | 08F2438D170092A700DFFB78 /* Resources */ = {
184 | isa = PBXResourcesBuildPhase;
185 | buildActionMask = 2147483647;
186 | files = (
187 | 08F2439D170092A700DFFB78 /* InfoPlist.strings in Resources */,
188 | 08F243A5170092A700DFFB78 /* Default.png in Resources */,
189 | 08F243A7170092A700DFFB78 /* Default@2x.png in Resources */,
190 | 08F243A9170092A700DFFB78 /* Default-568h@2x.png in Resources */,
191 | );
192 | runOnlyForDeploymentPostprocessing = 0;
193 | };
194 | /* End PBXResourcesBuildPhase section */
195 |
196 | /* Begin PBXSourcesBuildPhase section */
197 | 08F2438B170092A700DFFB78 /* Sources */ = {
198 | isa = PBXSourcesBuildPhase;
199 | buildActionMask = 2147483647;
200 | files = (
201 | 08F2439F170092A700DFFB78 /* main.m in Sources */,
202 | 08F243A3170092A700DFFB78 /* GEAppDelegate.m in Sources */,
203 | 08F243CB1700AE8E00DFFB78 /* GEExampleViewController.m in Sources */,
204 | );
205 | runOnlyForDeploymentPostprocessing = 0;
206 | };
207 | /* End PBXSourcesBuildPhase section */
208 |
209 | /* Begin PBXVariantGroup section */
210 | 08F2439B170092A700DFFB78 /* InfoPlist.strings */ = {
211 | isa = PBXVariantGroup;
212 | children = (
213 | 08F2439C170092A700DFFB78 /* en */,
214 | );
215 | name = InfoPlist.strings;
216 | sourceTree = "";
217 | };
218 | /* End PBXVariantGroup section */
219 |
220 | /* Begin XCBuildConfiguration section */
221 | 08F243AA170092A700DFFB78 /* Debug */ = {
222 | isa = XCBuildConfiguration;
223 | buildSettings = {
224 | ALWAYS_SEARCH_USER_PATHS = NO;
225 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
226 | CLANG_CXX_LIBRARY = "libc++";
227 | CLANG_ENABLE_OBJC_ARC = YES;
228 | CLANG_WARN_CONSTANT_CONVERSION = YES;
229 | CLANG_WARN_EMPTY_BODY = YES;
230 | CLANG_WARN_ENUM_CONVERSION = YES;
231 | CLANG_WARN_INT_CONVERSION = YES;
232 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
234 | COPY_PHASE_STRIP = NO;
235 | GCC_C_LANGUAGE_STANDARD = gnu99;
236 | GCC_DYNAMIC_NO_PIC = NO;
237 | GCC_OPTIMIZATION_LEVEL = 0;
238 | GCC_PREPROCESSOR_DEFINITIONS = (
239 | "DEBUG=1",
240 | "$(inherited)",
241 | );
242 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
243 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
244 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
245 | GCC_WARN_UNUSED_VARIABLE = YES;
246 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
247 | ONLY_ACTIVE_ARCH = YES;
248 | SDKROOT = iphoneos;
249 | };
250 | name = Debug;
251 | };
252 | 08F243AB170092A700DFFB78 /* Release */ = {
253 | isa = XCBuildConfiguration;
254 | buildSettings = {
255 | ALWAYS_SEARCH_USER_PATHS = NO;
256 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
257 | CLANG_CXX_LIBRARY = "libc++";
258 | CLANG_ENABLE_OBJC_ARC = YES;
259 | CLANG_WARN_CONSTANT_CONVERSION = YES;
260 | CLANG_WARN_EMPTY_BODY = YES;
261 | CLANG_WARN_ENUM_CONVERSION = YES;
262 | CLANG_WARN_INT_CONVERSION = YES;
263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
264 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
265 | COPY_PHASE_STRIP = YES;
266 | GCC_C_LANGUAGE_STANDARD = gnu99;
267 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
268 | GCC_WARN_UNINITIALIZED_AUTOS = YES;
269 | GCC_WARN_UNUSED_VARIABLE = YES;
270 | IPHONEOS_DEPLOYMENT_TARGET = 6.1;
271 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
272 | SDKROOT = iphoneos;
273 | VALIDATE_PRODUCT = YES;
274 | };
275 | name = Release;
276 | };
277 | 08F243AD170092A700DFFB78 /* Debug */ = {
278 | isa = XCBuildConfiguration;
279 | buildSettings = {
280 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
281 | GCC_PREFIX_HEADER = "GlimpseExample/GlimpseExample-Prefix.pch";
282 | INFOPLIST_FILE = "GlimpseExample/GlimpseExample-Info.plist";
283 | PRODUCT_NAME = "$(TARGET_NAME)";
284 | WRAPPER_EXTENSION = app;
285 | };
286 | name = Debug;
287 | };
288 | 08F243AE170092A700DFFB78 /* Release */ = {
289 | isa = XCBuildConfiguration;
290 | buildSettings = {
291 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
292 | GCC_PREFIX_HEADER = "GlimpseExample/GlimpseExample-Prefix.pch";
293 | INFOPLIST_FILE = "GlimpseExample/GlimpseExample-Info.plist";
294 | PRODUCT_NAME = "$(TARGET_NAME)";
295 | WRAPPER_EXTENSION = app;
296 | };
297 | name = Release;
298 | };
299 | /* End XCBuildConfiguration section */
300 |
301 | /* Begin XCConfigurationList section */
302 | 08F2438A170092A700DFFB78 /* Build configuration list for PBXProject "GlimpseExample" */ = {
303 | isa = XCConfigurationList;
304 | buildConfigurations = (
305 | 08F243AA170092A700DFFB78 /* Debug */,
306 | 08F243AB170092A700DFFB78 /* Release */,
307 | );
308 | defaultConfigurationIsVisible = 0;
309 | defaultConfigurationName = Release;
310 | };
311 | 08F243AC170092A700DFFB78 /* Build configuration list for PBXNativeTarget "GlimpseExample" */ = {
312 | isa = XCConfigurationList;
313 | buildConfigurations = (
314 | 08F243AD170092A700DFFB78 /* Debug */,
315 | 08F243AE170092A700DFFB78 /* Release */,
316 | );
317 | defaultConfigurationIsVisible = 0;
318 | };
319 | /* End XCConfigurationList section */
320 | };
321 | rootObject = 08F24387170092A700DFFB78 /* Project object */;
322 | }
323 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample.xcodeproj/xcuserdata/wesscope.xcuserdatad/xcschemes/GlimpseExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample.xcodeproj/xcuserdata/wesscope.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GlimpseExample.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 08F2438E170092A700DFFB78
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wess/Glimpse/17f56bf2679d660261dd83e88fcee4bed6515d6f/GlimpseExample/GlimpseExample/Default-568h@2x.png
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wess/Glimpse/17f56bf2679d660261dd83e88fcee4bed6515d6f/GlimpseExample/GlimpseExample/Default.png
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wess/Glimpse/17f56bf2679d660261dd83e88fcee4bed6515d6f/GlimpseExample/GlimpseExample/Default@2x.png
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/GEAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // GEAppDelegate.h
3 | // GlimpseExample
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GEAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/GEAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // GEAppDelegate.m
3 | // GlimpseExample
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import "GEAppDelegate.h"
10 | #import "GEExampleViewController.h"
11 | #import
12 |
13 | @implementation GEAppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | GEExampleViewController *controller = [[GEExampleViewController alloc] initWithNibName:nil bundle:nil];
18 |
19 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
20 | self.window.rootViewController = controller;
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 |
24 | return YES;
25 | }
26 |
27 | - (void)applicationWillResignActive:(UIApplication *)application
28 | {
29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
30 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
31 | }
32 |
33 | - (void)applicationDidEnterBackground:(UIApplication *)application
34 | {
35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
37 | }
38 |
39 | - (void)applicationWillEnterForeground:(UIApplication *)application
40 | {
41 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
42 | }
43 |
44 | - (void)applicationDidBecomeActive:(UIApplication *)application
45 | {
46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
47 | }
48 |
49 | - (void)applicationWillTerminate:(UIApplication *)application
50 | {
51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/GEExampleViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // GEExampleViewController.h
3 | // GlimpseExample
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface GEExampleViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/GEExampleViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // GEExampleViewController.m
3 | // GlimpseExample
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import "GEExampleViewController.h"
10 | #import
11 | #import
12 |
13 | @interface GEExampleViewController ()
14 | @property (strong, nonatomic) Glimpse *glimpse;
15 | @end
16 |
17 | @implementation GEExampleViewController
18 |
19 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
20 | {
21 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
22 | if (self)
23 | {
24 | self.glimpse = [[Glimpse alloc] init];
25 | }
26 | return self;
27 | }
28 |
29 | - (void)viewDidLoad
30 | {
31 | [super viewDidLoad];
32 |
33 | self.view.backgroundColor = [UIColor redColor];
34 | }
35 |
36 | - (void)viewDidAppear:(BOOL)animated
37 | {
38 | [super viewDidAppear:animated];
39 |
40 | [self.glimpse startRecordingView:self.view onCompletion:^(NSURL *fileOuputURL) {
41 | NSLog(@"DONE WITH OUTPUT: %@", fileOuputURL.absoluteString);
42 | }];
43 |
44 | UIView *view = [[UIView alloc] initWithFrame:CGRectInset(self.view.bounds, 40.0f, 40.0f)];
45 | view.backgroundColor = [UIColor greenColor];
46 | view.alpha = 0.0f;
47 | [self.view addSubview:view];
48 |
49 | [UIView animateWithDuration:5.0 animations:^{
50 | view.alpha = 1.0f;
51 | } completion:^(BOOL finished) {
52 | [self.glimpse stop];
53 | }];
54 |
55 | }
56 |
57 | - (void)didReceiveMemoryWarning
58 | {
59 | [super didReceiveMemoryWarning];
60 | // Dispose of any resources that can be recreated.
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/GlimpseExample-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.WessCope.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/GlimpseExample-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'GlimpseExample' target in the 'GlimpseExample' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_3_0
8 | #warning "This project uses features only available in iOS SDK 3.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/GlimpseExample/GlimpseExample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // GlimpseExample
4 | //
5 | // Created by Wess Cope on 3/25/13.
6 | // Copyright (c) 2013 Wess Cope. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "GEAppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([GEAppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Wess Cope
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Glimpse
2 | Glimpse is a simple library that allows you to create videos from UIViews. It records animations and actions as they happen by taking screen shots of a UIView in a series and then creating a quicktime video and saving it to your app’s document folder.
3 |
4 | ## Setup
5 | To setup Glimpse, add the `Glimpse` project file to your project or workspace. Import where you want to use it.
6 |
7 | ## Example Usage
8 | Glimpse only uses 2 methods that start and stop recording your view.
9 |
10 | ```objectivec
11 | #import
12 |
13 | @implementation myViewController
14 | - (void)viewDidAppear
15 | {
16 | [super viewDidAppear:animated];
17 |
18 | // Create a new Glimpse object.
19 | Glimpse *glimpse = [[Glimpse alloc] init];
20 |
21 | // Start recording and tell Glimpse what to do when you are finished
22 | [glimpse startRecordingView:self.view onCompletion:^(NSURL *fileOuputURL) {
23 | NSLog(@"DONE WITH OUTPUT: %@", fileOuputURL.absoluteString);
24 | }];
25 |
26 | // Create a subview for this example
27 | UIView *view = [[UIView alloc] initWithFrame:CGRectInset(self.view.bounds, 40.0f 40.0f)];
28 | view.backgroundColor = [UIColor greenColor];
29 | view.alpha = 0.0f;
30 |
31 | [self.view addSubview:view];
32 |
33 | // We are going to record the view fading in.
34 | [UIView animateWithDuration:5.0 animations:^{
35 | view.alpha = 1.0f;
36 | } completion:^(BOOL finished) {
37 | // Since our animation is complete, lets tell Glimpse to stop recording.
38 | [glimpse stop];
39 | }];
40 | }
41 | @end
42 | ```
43 | ## Developer info
44 | * [Github](http://www.github.com/wess)
45 | * [@WessCope](http://www.twitter.com/wesscope)
46 |
47 | ## License
48 | Read LICENSE file for more info.
49 |
--------------------------------------------------------------------------------