Skip to content

Commit 2d97862

Browse files
committed
Moved CameraViewController.
Added UI to open some test view controllers.
1 parent 4dd8c10 commit 2d97862

File tree

7 files changed

+1138
-789
lines changed

7 files changed

+1138
-789
lines changed
File renamed without changes.

cv/CameraViewController.m CameraViewController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ - (void)viewWillAppear:(BOOL)animated {
244244

245245
- (void)viewWillDisappear:(BOOL)animated {
246246
[super viewWillDisappear:animated];
247+
[self waitForSessionStopRunning];
247248
}
248249

249250
#pragma mark - To support orientaion
@@ -308,7 +309,6 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CM
308309
#pragma mark - dealloc
309310

310311
- (void)dealloc {
311-
[self waitForSessionStopRunning];
312312
free(buffer);
313313
[session release];
314314
[super dealloc];

cv.xcodeproj/project.pbxproj

+18-9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
14311C001361788700C0C593 /* cvViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14311BFE1361788700C0C593 /* cvViewController.xib */; };
1919
14311C1D13617C2300C0C593 /* MainWindow-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14311C1B13617C2300C0C593 /* MainWindow-iPad.xib */; };
2020
1443574013650BBF004CC7AA /* MyCameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1443573F13650BBF004CC7AA /* MyCameraViewController.m */; };
21+
1489D1621369001800C061B7 /* CameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1489D1611369001800C061B7 /* CameraViewController.m */; };
2122
14975FC613653CBA00F41B08 /* QuartzHelpLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 14975FC313653CBA00F41B08 /* QuartzHelpLibrary.m */; };
2223
14975FC713653CBA00F41B08 /* UIImage+pixel.m in Sources */ = {isa = PBXBuildFile; fileRef = 14975FC513653CBA00F41B08 /* UIImage+pixel.m */; };
2324
14B377941365BD6200738C9C /* icon114x114.png in Resources */ = {isa = PBXBuildFile; fileRef = 14B377911365BD6200738C9C /* icon114x114.png */; };
@@ -27,7 +28,6 @@
2728
14B377F21365C2C000738C9C /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14B377EE1365C2C000738C9C /* Default@2x.png */; };
2829
14B377FE1365C31E00738C9C /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 14B377FC1365C31E00738C9C /* Default-Landscape.png */; };
2930
14B377FF1365C31E00738C9C /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 14B377FD1365C31E00738C9C /* Default-Portrait.png */; };
30-
14C856181362C99E00968679 /* CameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14C856171362C99E00968679 /* CameraViewController.m */; };
3131
14C856251362DF7000968679 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14C856231362DF7000968679 /* CoreMedia.framework */; };
3232
14C856261362DF7000968679 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14C856241362DF7000968679 /* CoreVideo.framework */; };
3333
14C8562813630B2400968679 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14C8562713630B2400968679 /* AVFoundation.framework */; };
@@ -52,6 +52,8 @@
5252
14311C1C13617C2300C0C593 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = "en.lproj/MainWindow-iPad.xib"; sourceTree = "<group>"; };
5353
1443573E13650BBF004CC7AA /* MyCameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyCameraViewController.h; sourceTree = "<group>"; };
5454
1443573F13650BBF004CC7AA /* MyCameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyCameraViewController.m; sourceTree = "<group>"; };
55+
1489D1601369001800C061B7 /* CameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraViewController.h; sourceTree = SOURCE_ROOT; };
56+
1489D1611369001800C061B7 /* CameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = SOURCE_ROOT; };
5557
14975FC213653CBA00F41B08 /* QuartzHelpLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzHelpLibrary.h; path = "../../Quartz-Help-Library/QuartzHelpLibrary.h"; sourceTree = "<group>"; };
5658
14975FC313653CBA00F41B08 /* QuartzHelpLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QuartzHelpLibrary.m; path = "../../Quartz-Help-Library/QuartzHelpLibrary.m"; sourceTree = "<group>"; };
5759
14975FC413653CBA00F41B08 /* UIImage+pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+pixel.h"; path = "../../Quartz-Help-Library/UIImage+pixel.h"; sourceTree = "<group>"; };
@@ -63,8 +65,6 @@
6365
14B377EE1365C2C000738C9C /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
6466
14B377FC1365C31E00738C9C /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape.png"; sourceTree = "<group>"; };
6567
14B377FD1365C31E00738C9C /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait.png"; sourceTree = "<group>"; };
66-
14C856161362C99E00968679 /* CameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraViewController.h; sourceTree = "<group>"; };
67-
14C856171362C99E00968679 /* CameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = "<group>"; };
6868
14C856221362DF7000968679 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
6969
14C856231362DF7000968679 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
7070
14C856241362DF7000968679 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
@@ -93,6 +93,9 @@
9393
14311BD71361788700C0C593 = {
9494
isa = PBXGroup;
9595
children = (
96+
1489D1601369001800C061B7 /* CameraViewController.h */,
97+
1489D1611369001800C061B7 /* CameraViewController.m */,
98+
14975FC813654A1300F41B08 /* Quartz Help Library */,
9699
14311BEC1361788700C0C593 /* cv */,
97100
14311BE51361788700C0C593 /* Frameworks */,
98101
14311BE31361788700C0C593 /* Products */,
@@ -125,11 +128,7 @@
125128
14311BEC1361788700C0C593 /* cv */ = {
126129
isa = PBXGroup;
127130
children = (
128-
14C856161362C99E00968679 /* CameraViewController.h */,
129-
14C856171362C99E00968679 /* CameraViewController.m */,
130-
14975FC813654A1300F41B08 /* Quartz Help Library */,
131-
1443573E13650BBF004CC7AA /* MyCameraViewController.h */,
132-
1443573F13650BBF004CC7AA /* MyCameraViewController.m */,
131+
1489D1631369002F00C061B7 /* Test ViewControllers */,
133132
14311BF51361788700C0C593 /* cvAppDelegate.h */,
134133
14311BF61361788700C0C593 /* cvAppDelegate.m */,
135134
14311BFB1361788700C0C593 /* cvViewController.h */,
@@ -154,6 +153,15 @@
154153
name = "Supporting Files";
155154
sourceTree = "<group>";
156155
};
156+
1489D1631369002F00C061B7 /* Test ViewControllers */ = {
157+
isa = PBXGroup;
158+
children = (
159+
1443573E13650BBF004CC7AA /* MyCameraViewController.h */,
160+
1443573F13650BBF004CC7AA /* MyCameraViewController.m */,
161+
);
162+
name = "Test ViewControllers";
163+
sourceTree = "<group>";
164+
};
157165
14975FC813654A1300F41B08 /* Quartz Help Library */ = {
158166
isa = PBXGroup;
159167
children = (
@@ -163,6 +171,7 @@
163171
14975FC513653CBA00F41B08 /* UIImage+pixel.m */,
164172
);
165173
name = "Quartz Help Library";
174+
path = cv;
166175
sourceTree = "<group>";
167176
};
168177
14B3778F1365BD6200738C9C /* Resources */ = {
@@ -258,10 +267,10 @@
258267
14311BF41361788700C0C593 /* main.m in Sources */,
259268
14311BF71361788700C0C593 /* cvAppDelegate.m in Sources */,
260269
14311BFD1361788700C0C593 /* cvViewController.m in Sources */,
261-
14C856181362C99E00968679 /* CameraViewController.m in Sources */,
262270
1443574013650BBF004CC7AA /* MyCameraViewController.m in Sources */,
263271
14975FC613653CBA00F41B08 /* QuartzHelpLibrary.m in Sources */,
264272
14975FC713653CBA00F41B08 /* UIImage+pixel.m in Sources */,
273+
1489D1621369001800C061B7 /* CameraViewController.m in Sources */,
265274
);
266275
runOnlyForDeploymentPostprocessing = 0;
267276
};

0 commit comments

Comments
 (0)