├── .gitignore ├── README.md ├── UIImagePickerController+SimulatedCamera.h ├── UIImagePickerController+SimulatedCamera.m └── demo ├── CameraTest-Info.plist ├── CameraTest.xcodeproj └── project.pbxproj ├── CameraTestViewController.xib ├── CameraTest_Prefix.pch ├── Classes ├── CameraTestAppDelegate.h ├── CameraTestAppDelegate.m ├── CameraTestViewController.h └── CameraTestViewController.m ├── MainWindow.xib └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *swp 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Making use of the camera in the iPhone Simulator 3 | 4 | An Objective-C category that enables (fake) taking of a picture from within the iPhone/iPad simulator, avoiding the need to test exclusively in hardware. 5 | 6 | 7 | 8 | ## Documentation: 9 | * [http://wiki.github.com/nrocy/UIImagePickerController-SimulatedCamera](http://wiki.github.com/nrocy/UIImagePickerController-SimulatedCamera) 10 | 11 | 12 | ## Demo: 13 | * XCode project in the demo subdirectory 14 | 15 | 16 | -------------------------------------------------------------------------------- /UIImagePickerController+SimulatedCamera.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImagePickerController+SimulatedCamera.h 3 | // 4 | // Created by Paul King on 29/06/2010. 5 | // Copyright 2010 Paul King. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface UIImagePickerController(SimulatedCamera) 11 | 12 | -(void)mockCameraWithImageURL:(NSString*)url; 13 | -(void)mockCameraWithImageURL:(NSString*)url delay:(NSInteger)delay; 14 | -(void)mockCancel; 15 | -(void)mockCancelWithDelay:(NSInteger)delay; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /UIImagePickerController+SimulatedCamera.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImagePickerController+SimulatedCamera.m 3 | // 4 | // Created by Paul King on 29/06/2010. 5 | // Copyright 2010 Paul King. All rights reserved. 6 | // 7 | 8 | #import "UIImagePickerController+SimulatedCamera.h" 9 | 10 | #define kUIImagePickerControllerSimulatedCameraDefaultDelay 2.0 11 | 12 | @implementation UIImagePickerController(SimulatedCamera) 13 | 14 | #pragma mark - 15 | #pragma mark Timer methods 16 | 17 | -(void)cameraDismissTimerFireMethod:(NSTimer*)timer 18 | { 19 | NSString *urlString = (NSString*)timer.userInfo; 20 | 21 | NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:urlString]]; 22 | NSData *imagedata = [NSData dataWithContentsOfURL:url]; 23 | UIImage *image = [UIImage imageWithData:imagedata]; 24 | 25 | NSDictionary *info = [NSDictionary dictionaryWithObjectsAndKeys:image, UIImagePickerControllerOriginalImage, image, UIImagePickerControllerEditedImage, nil]; 26 | 27 | [self.delegate imagePickerController:(UIImagePickerController *)self didFinishPickingMediaWithInfo:(NSDictionary *)info]; 28 | } 29 | 30 | -(void)cameraCancellTimerFireMethod:(NSTimer*)timer 31 | { 32 | [self.delegate imagePickerControllerDidCancel:(UIImagePickerController *)self]; 33 | } 34 | 35 | #pragma mark - 36 | #pragma mark Public methods 37 | 38 | -(void)mockCameraWithImageURL:(NSString *)url 39 | { 40 | [self mockCameraWithImageURL:url delay:kUIImagePickerControllerSimulatedCameraDefaultDelay]; 41 | } 42 | 43 | -(void)mockCameraWithImageURL:(NSString*)url delay:(NSInteger)delay 44 | { 45 | if( [self.delegate respondsToSelector:@selector(imagePickerController:didFinishPickingMediaWithInfo:)] ) 46 | { 47 | [NSTimer scheduledTimerWithTimeInterval:delay target:self selector:@selector(cameraDismissTimerFireMethod:) userInfo:url repeats:NO]; 48 | } 49 | else 50 | { 51 | NSLog( @"You've called mockCameraWithImageURL but you've not implemented didFinishPickingMediaWithInfo" ); 52 | } 53 | } 54 | 55 | -(void)mockCancelWithDelay:(NSInteger)delay 56 | { 57 | if( [self.delegate respondsToSelector:@selector(imagePickerControllerDidCancel:)] ) 58 | { 59 | [NSTimer scheduledTimerWithTimeInterval:delay target:self selector:@selector(cameraCancellTimerFireMethod:) userInfo:nil repeats:NO]; 60 | } 61 | else 62 | { 63 | NSLog( @"You've called mockCancelWithDelay but you've not implemented imagePickerControllerDidCancel" ); 64 | } 65 | } 66 | 67 | -(void)mockCancel 68 | { 69 | [self mockCancelWithDelay:kUIImagePickerControllerSimulatedCameraDefaultDelay]; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /demo/CameraTest-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /demo/CameraTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 45; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1644E0F811DE39510066FA6D /* UIImagePickerController+SimulatedCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 1644E0F711DE39510066FA6D /* UIImagePickerController+SimulatedCamera.m */; }; 11 | 1D3623260D0F684500981E51 /* CameraTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* CameraTestAppDelegate.m */; }; 12 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; 13 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 14 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 15 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; 16 | 2899E5220DE3E06400AC0155 /* CameraTestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* CameraTestViewController.xib */; }; 17 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; 18 | 28D7ACF80DDB3853001CB0EB /* CameraTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* CameraTestViewController.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1644E0F611DE39510066FA6D /* UIImagePickerController+SimulatedCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImagePickerController+SimulatedCamera.h"; path = "../UIImagePickerController+SimulatedCamera.h"; sourceTree = SOURCE_ROOT; }; 23 | 1644E0F711DE39510066FA6D /* UIImagePickerController+SimulatedCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIImagePickerController+SimulatedCamera.m"; path = "../UIImagePickerController+SimulatedCamera.m"; sourceTree = SOURCE_ROOT; }; 24 | 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | 1D3623240D0F684500981E51 /* CameraTestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraTestAppDelegate.h; sourceTree = ""; }; 26 | 1D3623250D0F684500981E51 /* CameraTestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraTestAppDelegate.m; sourceTree = ""; }; 27 | 1D6058910D05DD3D006BFB54 /* CameraTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CameraTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 2899E5210DE3E06400AC0155 /* CameraTestViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CameraTestViewController.xib; sourceTree = ""; }; 31 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; 32 | 28D7ACF60DDB3853001CB0EB /* CameraTestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraTestViewController.h; sourceTree = ""; }; 33 | 28D7ACF70DDB3853001CB0EB /* CameraTestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraTestViewController.m; sourceTree = ""; }; 34 | 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | 32CA4F630368D1EE00C91783 /* CameraTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraTest_Prefix.pch; sourceTree = ""; }; 36 | 8D1107310486CEB800E47090 /* CameraTest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "CameraTest-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 45 | 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 46 | 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXFrameworksBuildPhase section */ 51 | 52 | /* Begin PBXGroup section */ 53 | 080E96DDFE201D6D7F000001 /* Classes */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1D3623240D0F684500981E51 /* CameraTestAppDelegate.h */, 57 | 1D3623250D0F684500981E51 /* CameraTestAppDelegate.m */, 58 | 28D7ACF60DDB3853001CB0EB /* CameraTestViewController.h */, 59 | 28D7ACF70DDB3853001CB0EB /* CameraTestViewController.m */, 60 | ); 61 | path = Classes; 62 | sourceTree = ""; 63 | }; 64 | 1644DEA411D98C720066FA6D /* Libraries */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1644E0F611DE39510066FA6D /* UIImagePickerController+SimulatedCamera.h */, 68 | 1644E0F711DE39510066FA6D /* UIImagePickerController+SimulatedCamera.m */, 69 | ); 70 | name = Libraries; 71 | sourceTree = ""; 72 | }; 73 | 19C28FACFE9D520D11CA2CBB /* Products */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 1D6058910D05DD3D006BFB54 /* CameraTest.app */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 1644DEA411D98C720066FA6D /* Libraries */, 85 | 080E96DDFE201D6D7F000001 /* Classes */, 86 | 29B97315FDCFA39411CA2CEA /* Other Sources */, 87 | 29B97317FDCFA39411CA2CEA /* Resources */, 88 | 29B97323FDCFA39411CA2CEA /* Frameworks */, 89 | 19C28FACFE9D520D11CA2CBB /* Products */, 90 | ); 91 | name = CustomTemplate; 92 | sourceTree = ""; 93 | }; 94 | 29B97315FDCFA39411CA2CEA /* Other Sources */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 32CA4F630368D1EE00C91783 /* CameraTest_Prefix.pch */, 98 | 29B97316FDCFA39411CA2CEA /* main.m */, 99 | ); 100 | name = "Other Sources"; 101 | sourceTree = ""; 102 | }; 103 | 29B97317FDCFA39411CA2CEA /* Resources */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 2899E5210DE3E06400AC0155 /* CameraTestViewController.xib */, 107 | 28AD733E0D9D9553002E5188 /* MainWindow.xib */, 108 | 8D1107310486CEB800E47090 /* CameraTest-Info.plist */, 109 | ); 110 | name = Resources; 111 | sourceTree = ""; 112 | }; 113 | 29B97323FDCFA39411CA2CEA /* Frameworks */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, 117 | 1D30AB110D05D00D00671497 /* Foundation.framework */, 118 | 288765A40DF7441C002DB57D /* CoreGraphics.framework */, 119 | ); 120 | name = Frameworks; 121 | sourceTree = ""; 122 | }; 123 | /* End PBXGroup section */ 124 | 125 | /* Begin PBXNativeTarget section */ 126 | 1D6058900D05DD3D006BFB54 /* CameraTest */ = { 127 | isa = PBXNativeTarget; 128 | buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "CameraTest" */; 129 | buildPhases = ( 130 | 1D60588D0D05DD3D006BFB54 /* Resources */, 131 | 1D60588E0D05DD3D006BFB54 /* Sources */, 132 | 1D60588F0D05DD3D006BFB54 /* Frameworks */, 133 | ); 134 | buildRules = ( 135 | ); 136 | dependencies = ( 137 | ); 138 | name = CameraTest; 139 | productName = CameraTest; 140 | productReference = 1D6058910D05DD3D006BFB54 /* CameraTest.app */; 141 | productType = "com.apple.product-type.application"; 142 | }; 143 | /* End PBXNativeTarget section */ 144 | 145 | /* Begin PBXProject section */ 146 | 29B97313FDCFA39411CA2CEA /* Project object */ = { 147 | isa = PBXProject; 148 | buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CameraTest" */; 149 | compatibilityVersion = "Xcode 3.1"; 150 | hasScannedForEncodings = 1; 151 | mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; 152 | projectDirPath = ""; 153 | projectRoot = ""; 154 | targets = ( 155 | 1D6058900D05DD3D006BFB54 /* CameraTest */, 156 | ); 157 | }; 158 | /* End PBXProject section */ 159 | 160 | /* Begin PBXResourcesBuildPhase section */ 161 | 1D60588D0D05DD3D006BFB54 /* Resources */ = { 162 | isa = PBXResourcesBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, 166 | 2899E5220DE3E06400AC0155 /* CameraTestViewController.xib in Resources */, 167 | ); 168 | runOnlyForDeploymentPostprocessing = 0; 169 | }; 170 | /* End PBXResourcesBuildPhase section */ 171 | 172 | /* Begin PBXSourcesBuildPhase section */ 173 | 1D60588E0D05DD3D006BFB54 /* Sources */ = { 174 | isa = PBXSourcesBuildPhase; 175 | buildActionMask = 2147483647; 176 | files = ( 177 | 1D60589B0D05DD56006BFB54 /* main.m in Sources */, 178 | 1D3623260D0F684500981E51 /* CameraTestAppDelegate.m in Sources */, 179 | 28D7ACF80DDB3853001CB0EB /* CameraTestViewController.m in Sources */, 180 | 1644E0F811DE39510066FA6D /* UIImagePickerController+SimulatedCamera.m in Sources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXSourcesBuildPhase section */ 185 | 186 | /* Begin XCBuildConfiguration section */ 187 | 1D6058940D05DD3E006BFB54 /* Debug */ = { 188 | isa = XCBuildConfiguration; 189 | buildSettings = { 190 | ALWAYS_SEARCH_USER_PATHS = NO; 191 | COPY_PHASE_STRIP = NO; 192 | GCC_DYNAMIC_NO_PIC = NO; 193 | GCC_OPTIMIZATION_LEVEL = 0; 194 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 195 | GCC_PREFIX_HEADER = CameraTest_Prefix.pch; 196 | INFOPLIST_FILE = "CameraTest-Info.plist"; 197 | PRODUCT_NAME = CameraTest; 198 | }; 199 | name = Debug; 200 | }; 201 | 1D6058950D05DD3E006BFB54 /* Release */ = { 202 | isa = XCBuildConfiguration; 203 | buildSettings = { 204 | ALWAYS_SEARCH_USER_PATHS = NO; 205 | COPY_PHASE_STRIP = YES; 206 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 207 | GCC_PREFIX_HEADER = CameraTest_Prefix.pch; 208 | INFOPLIST_FILE = "CameraTest-Info.plist"; 209 | PRODUCT_NAME = CameraTest; 210 | VALIDATE_PRODUCT = YES; 211 | }; 212 | name = Release; 213 | }; 214 | C01FCF4F08A954540054247B /* Debug */ = { 215 | isa = XCBuildConfiguration; 216 | buildSettings = { 217 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 218 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 219 | GCC_C_LANGUAGE_STANDARD = c99; 220 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 221 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 222 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 223 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 224 | GCC_WARN_UNUSED_VARIABLE = YES; 225 | PREBINDING = NO; 226 | SDKROOT = iphoneos3.2; 227 | }; 228 | name = Debug; 229 | }; 230 | C01FCF5008A954540054247B /* Release */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 234 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 235 | GCC_C_LANGUAGE_STANDARD = c99; 236 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 237 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 238 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 239 | GCC_WARN_UNUSED_VARIABLE = YES; 240 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 241 | PREBINDING = NO; 242 | SDKROOT = iphoneos3.2; 243 | }; 244 | name = Release; 245 | }; 246 | /* End XCBuildConfiguration section */ 247 | 248 | /* Begin XCConfigurationList section */ 249 | 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "CameraTest" */ = { 250 | isa = XCConfigurationList; 251 | buildConfigurations = ( 252 | 1D6058940D05DD3E006BFB54 /* Debug */, 253 | 1D6058950D05DD3E006BFB54 /* Release */, 254 | ); 255 | defaultConfigurationIsVisible = 0; 256 | defaultConfigurationName = Release; 257 | }; 258 | C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CameraTest" */ = { 259 | isa = XCConfigurationList; 260 | buildConfigurations = ( 261 | C01FCF4F08A954540054247B /* Debug */, 262 | C01FCF5008A954540054247B /* Release */, 263 | ); 264 | defaultConfigurationIsVisible = 0; 265 | defaultConfigurationName = Release; 266 | }; 267 | /* End XCConfigurationList section */ 268 | }; 269 | rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; 270 | } 271 | -------------------------------------------------------------------------------- /demo/CameraTestViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 800 5 | 10F569 6 | 788 7 | 1038.29 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 117 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | 44 | YES 45 | 46 | 47 | 292 48 | {{6, 435}, {368, 21}} 49 | 50 | NO 51 | YES 52 | 7 53 | NO 54 | IBCocoaTouchFramework 55 | UIImagePickerControllerSourceTypeCamera: 56 | 57 | Helvetica 58 | 12 59 | 16 60 | 61 | 62 | 1 63 | MCAwIDAAA 64 | 65 | 66 | 1 67 | 10 68 | 69 | 70 | 71 | 292 72 | {{252, 435}, {131, 21}} 73 | 74 | NO 75 | YES 76 | 7 77 | NO 78 | IBCocoaTouchFramework 79 | 80 | 81 | 82 | 83 | 1 84 | 10 85 | 86 | 87 | 88 | 292 89 | {{20, 380}, {138, 37}} 90 | 91 | NO 92 | IBCocoaTouchFramework 93 | 0 94 | 0 95 | 96 | Helvetica-Bold 97 | 15 98 | 16 99 | 100 | 1 101 | Snap & Take! 102 | 103 | 3 104 | MQA 105 | 106 | 107 | 1 108 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 109 | 110 | 111 | 3 112 | MC41AA 113 | 114 | 115 | 116 | 117 | 292 118 | {{166, 380}, {135, 37}} 119 | 120 | NO 121 | IBCocoaTouchFramework 122 | 0 123 | 0 124 | 125 | 1 126 | Snap & Cancel! 127 | 128 | 129 | 1 130 | MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA 131 | 132 | 133 | 134 | 135 | 136 | 292 137 | {{20, 57}, {280, 308}} 138 | 139 | 1 140 | NO 141 | IBCocoaTouchFramework 142 | 143 | 144 | 145 | 290 146 | {{-1, 0}, {320, 44}} 147 | 148 | IBCocoaTouchFramework 149 | 150 | YES 151 | 152 | 153 | Simulator Camera Test 154 | IBCocoaTouchFramework 155 | 156 | 157 | 158 | 159 | {320, 460} 160 | 161 | 162 | 3 163 | MC43NQA 164 | 165 | 2 166 | 167 | 168 | NO 169 | 170 | IBCocoaTouchFramework 171 | 172 | 173 | 174 | 175 | YES 176 | 177 | 178 | label 179 | 180 | 181 | 182 | 12 183 | 184 | 185 | 186 | view 187 | 188 | 189 | 190 | 13 191 | 192 | 193 | 194 | snapButton 195 | 196 | 197 | 7 198 | 199 | 15 200 | 201 | 202 | 203 | imageView 204 | 205 | 206 | 207 | 17 208 | 209 | 210 | 211 | cancelButton 212 | 213 | 214 | 7 215 | 216 | 23 217 | 218 | 219 | 220 | 221 | YES 222 | 223 | 0 224 | 225 | 226 | 227 | 228 | 229 | -1 230 | 231 | 232 | File's Owner 233 | 234 | 235 | -2 236 | 237 | 238 | 239 | 240 | 6 241 | 242 | 243 | YES 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 10 255 | 256 | 257 | 258 | 259 | 11 260 | 261 | 262 | 263 | 264 | 14 265 | 266 | 267 | 268 | 269 | 16 270 | 271 | 272 | 273 | 274 | 19 275 | 276 | 277 | YES 278 | 279 | 280 | 281 | 282 | 283 | 20 284 | 285 | 286 | 287 | 288 | 21 289 | 290 | 291 | 292 | 293 | 294 | 295 | YES 296 | 297 | YES 298 | -1.CustomClassName 299 | -2.CustomClassName 300 | 10.IBPluginDependency 301 | 11.IBPluginDependency 302 | 14.IBPluginDependency 303 | 16.IBPluginDependency 304 | 19.IBPluginDependency 305 | 20.IBPluginDependency 306 | 21.IBPluginDependency 307 | 6.IBEditorWindowLastContentRect 308 | 6.IBPluginDependency 309 | 310 | 311 | YES 312 | CameraTestViewController 313 | UIResponder 314 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 315 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 316 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 317 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 318 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 319 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 320 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 321 | {{634, 243}, {320, 480}} 322 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 323 | 324 | 325 | 326 | YES 327 | 328 | 329 | YES 330 | 331 | 332 | 333 | 334 | YES 335 | 336 | 337 | YES 338 | 339 | 340 | 341 | 23 342 | 343 | 344 | 345 | YES 346 | 347 | CameraTestViewController 348 | UIViewController 349 | 350 | YES 351 | 352 | YES 353 | cancelButton 354 | snapButton 355 | 356 | 357 | YES 358 | id 359 | id 360 | 361 | 362 | 363 | YES 364 | 365 | YES 366 | cancelButton 367 | snapButton 368 | 369 | 370 | YES 371 | 372 | cancelButton 373 | id 374 | 375 | 376 | snapButton 377 | id 378 | 379 | 380 | 381 | 382 | YES 383 | 384 | YES 385 | imageView 386 | label 387 | 388 | 389 | YES 390 | UIImageView 391 | UILabel 392 | 393 | 394 | 395 | YES 396 | 397 | YES 398 | imageView 399 | label 400 | 401 | 402 | YES 403 | 404 | imageView 405 | UIImageView 406 | 407 | 408 | label 409 | UILabel 410 | 411 | 412 | 413 | 414 | IBProjectSource 415 | Classes/CameraTestViewController.h 416 | 417 | 418 | 419 | 420 | YES 421 | 422 | NSObject 423 | 424 | IBFrameworkSource 425 | Foundation.framework/Headers/NSError.h 426 | 427 | 428 | 429 | NSObject 430 | 431 | IBFrameworkSource 432 | Foundation.framework/Headers/NSFileManager.h 433 | 434 | 435 | 436 | NSObject 437 | 438 | IBFrameworkSource 439 | Foundation.framework/Headers/NSKeyValueCoding.h 440 | 441 | 442 | 443 | NSObject 444 | 445 | IBFrameworkSource 446 | Foundation.framework/Headers/NSKeyValueObserving.h 447 | 448 | 449 | 450 | NSObject 451 | 452 | IBFrameworkSource 453 | Foundation.framework/Headers/NSKeyedArchiver.h 454 | 455 | 456 | 457 | NSObject 458 | 459 | IBFrameworkSource 460 | Foundation.framework/Headers/NSNetServices.h 461 | 462 | 463 | 464 | NSObject 465 | 466 | IBFrameworkSource 467 | Foundation.framework/Headers/NSObject.h 468 | 469 | 470 | 471 | NSObject 472 | 473 | IBFrameworkSource 474 | Foundation.framework/Headers/NSPort.h 475 | 476 | 477 | 478 | NSObject 479 | 480 | IBFrameworkSource 481 | Foundation.framework/Headers/NSRunLoop.h 482 | 483 | 484 | 485 | NSObject 486 | 487 | IBFrameworkSource 488 | Foundation.framework/Headers/NSStream.h 489 | 490 | 491 | 492 | NSObject 493 | 494 | IBFrameworkSource 495 | Foundation.framework/Headers/NSThread.h 496 | 497 | 498 | 499 | NSObject 500 | 501 | IBFrameworkSource 502 | Foundation.framework/Headers/NSURL.h 503 | 504 | 505 | 506 | NSObject 507 | 508 | IBFrameworkSource 509 | Foundation.framework/Headers/NSURLConnection.h 510 | 511 | 512 | 513 | NSObject 514 | 515 | IBFrameworkSource 516 | Foundation.framework/Headers/NSXMLParser.h 517 | 518 | 519 | 520 | NSObject 521 | 522 | IBFrameworkSource 523 | UIKit.framework/Headers/UIAccessibility.h 524 | 525 | 526 | 527 | NSObject 528 | 529 | IBFrameworkSource 530 | UIKit.framework/Headers/UINibLoading.h 531 | 532 | 533 | 534 | NSObject 535 | 536 | IBFrameworkSource 537 | UIKit.framework/Headers/UIResponder.h 538 | 539 | 540 | 541 | UIBarButtonItem 542 | UIBarItem 543 | 544 | IBFrameworkSource 545 | UIKit.framework/Headers/UIBarButtonItem.h 546 | 547 | 548 | 549 | UIBarItem 550 | NSObject 551 | 552 | IBFrameworkSource 553 | UIKit.framework/Headers/UIBarItem.h 554 | 555 | 556 | 557 | UIButton 558 | UIControl 559 | 560 | IBFrameworkSource 561 | UIKit.framework/Headers/UIButton.h 562 | 563 | 564 | 565 | UIControl 566 | UIView 567 | 568 | IBFrameworkSource 569 | UIKit.framework/Headers/UIControl.h 570 | 571 | 572 | 573 | UIImageView 574 | UIView 575 | 576 | IBFrameworkSource 577 | UIKit.framework/Headers/UIImageView.h 578 | 579 | 580 | 581 | UILabel 582 | UIView 583 | 584 | IBFrameworkSource 585 | UIKit.framework/Headers/UILabel.h 586 | 587 | 588 | 589 | UINavigationBar 590 | UIView 591 | 592 | IBFrameworkSource 593 | UIKit.framework/Headers/UINavigationBar.h 594 | 595 | 596 | 597 | UINavigationItem 598 | NSObject 599 | 600 | 601 | 602 | UIResponder 603 | NSObject 604 | 605 | 606 | 607 | UISearchBar 608 | UIView 609 | 610 | IBFrameworkSource 611 | UIKit.framework/Headers/UISearchBar.h 612 | 613 | 614 | 615 | UISearchDisplayController 616 | NSObject 617 | 618 | IBFrameworkSource 619 | UIKit.framework/Headers/UISearchDisplayController.h 620 | 621 | 622 | 623 | UIView 624 | 625 | IBFrameworkSource 626 | UIKit.framework/Headers/UITextField.h 627 | 628 | 629 | 630 | UIView 631 | UIResponder 632 | 633 | IBFrameworkSource 634 | UIKit.framework/Headers/UIView.h 635 | 636 | 637 | 638 | UIViewController 639 | 640 | IBFrameworkSource 641 | UIKit.framework/Headers/UINavigationController.h 642 | 643 | 644 | 645 | UIViewController 646 | 647 | IBFrameworkSource 648 | UIKit.framework/Headers/UIPopoverController.h 649 | 650 | 651 | 652 | UIViewController 653 | 654 | IBFrameworkSource 655 | UIKit.framework/Headers/UISplitViewController.h 656 | 657 | 658 | 659 | UIViewController 660 | 661 | IBFrameworkSource 662 | UIKit.framework/Headers/UITabBarController.h 663 | 664 | 665 | 666 | UIViewController 667 | UIResponder 668 | 669 | IBFrameworkSource 670 | UIKit.framework/Headers/UIViewController.h 671 | 672 | 673 | 674 | 675 | 0 676 | IBCocoaTouchFramework 677 | 678 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 679 | 680 | 681 | 682 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 683 | 684 | 685 | YES 686 | CameraTest.xcodeproj 687 | 3 688 | 117 689 | 690 | 691 | -------------------------------------------------------------------------------- /demo/CameraTest_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'CameraTest' target in the 'CameraTest' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #import 8 | #endif 9 | -------------------------------------------------------------------------------- /demo/Classes/CameraTestAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CameraTestAppDelegate.h 3 | // CameraTest 4 | // 5 | // Created by Paul King on 24/06/2010. 6 | // Copyright Paul King 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CameraTestViewController; 12 | 13 | @interface CameraTestAppDelegate : NSObject { 14 | UIWindow *window; 15 | CameraTestViewController *viewController; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UIWindow *window; 19 | @property (nonatomic, retain) IBOutlet CameraTestViewController *viewController; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /demo/Classes/CameraTestAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // CameraTestAppDelegate.m 3 | // CameraTest 4 | // 5 | // Created by Paul King on 24/06/2010. 6 | // Copyright Paul King 2010. All rights reserved. 7 | // 8 | 9 | #import "CameraTestAppDelegate.h" 10 | #import "CameraTestViewController.h" 11 | 12 | @implementation CameraTestAppDelegate 13 | 14 | @synthesize window; 15 | @synthesize viewController; 16 | 17 | 18 | #pragma mark - 19 | #pragma mark Application lifecycle 20 | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 | 23 | // Override point for customization after application launch. 24 | 25 | // Add the view controller's view to the window and display. 26 | [window addSubview:viewController.view]; 27 | [window makeKeyAndVisible]; 28 | 29 | return YES; 30 | } 31 | 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application { 34 | /* 35 | 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. 36 | 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. 37 | */ 38 | } 39 | 40 | 41 | - (void)applicationDidEnterBackground:(UIApplication *)application { 42 | /* 43 | 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. 44 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 45 | */ 46 | } 47 | 48 | 49 | - (void)applicationWillEnterForeground:(UIApplication *)application { 50 | /* 51 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 52 | */ 53 | } 54 | 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application { 57 | /* 58 | 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. 59 | */ 60 | } 61 | 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | /* 65 | Called when the application is about to terminate. 66 | See also applicationDidEnterBackground:. 67 | */ 68 | } 69 | 70 | 71 | #pragma mark - 72 | #pragma mark Memory management 73 | 74 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 75 | /* 76 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 77 | */ 78 | } 79 | 80 | 81 | - (void)dealloc { 82 | [viewController release]; 83 | [window release]; 84 | [super dealloc]; 85 | } 86 | 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /demo/Classes/CameraTestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CameraTestViewController.h 3 | // CameraTest 4 | // 5 | // Created by Paul King on 24/06/2010. 6 | // Copyright Paul King 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CameraTestViewController : UIViewController { 12 | IBOutlet UILabel *label; 13 | IBOutlet UIImageView *imageView; 14 | } 15 | 16 | @property (nonatomic, retain) UILabel *label; 17 | @property (nonatomic, retain) UIImageView *imageView; 18 | 19 | -(IBAction) snapButton; 20 | -(IBAction) cancelButton; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /demo/Classes/CameraTestViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CameraTestViewController.m 3 | // CameraTest 4 | // 5 | // Created by Paul King on 24/06/2010. 6 | // Copyright Paul King 2010. All rights reserved. 7 | // 8 | 9 | #import "CameraTestViewController.h" 10 | 11 | #ifdef DEBUG 12 | #import "UIImagePickerController+SimulatedCamera.h" 13 | #endif 14 | 15 | @implementation CameraTestViewController 16 | 17 | @synthesize label; 18 | @synthesize imageView; 19 | 20 | - (void)viewDidUnload { 21 | self.imageView = nil; 22 | self.label = nil; 23 | } 24 | 25 | 26 | - (void)dealloc { 27 | [self.imageView dealloc]; 28 | [self.label dealloc]; 29 | 30 | [super dealloc]; 31 | } 32 | 33 | 34 | - (void)viewDidLoad { 35 | [super viewDidLoad]; 36 | 37 | NSString *hasCamera = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] ? @"Hell Yeah!" : @"No :("; 38 | self.label.text = hasCamera; 39 | } 40 | 41 | - (void)didReceiveMemoryWarning { 42 | // Releases the view if it doesn't have a superview. 43 | [super didReceiveMemoryWarning]; 44 | 45 | // Release any cached data, images, etc that aren't in use. 46 | } 47 | 48 | #pragma mark - 49 | #pragma mark UIImagePickerControllerDelegate methods 50 | 51 | - (void)imagePickerController:(UIImagePickerController *)thePicker didFinishPickingMediaWithInfo:(NSDictionary *)info 52 | { 53 | [thePicker dismissModalViewControllerAnimated:YES]; 54 | self.imageView.image = [info objectForKey:UIImagePickerControllerOriginalImage]; 55 | } 56 | 57 | - (void)imagePickerControllerDidCancel:(UIImagePickerController *)thePicker 58 | { 59 | [thePicker dismissModalViewControllerAnimated:YES]; 60 | self.imageView.image = nil; 61 | } 62 | 63 | #pragma mark - 64 | #pragma mark Actions 65 | 66 | -(IBAction) snapButton 67 | { 68 | UIImagePickerController *picker = [[UIImagePickerController alloc] init]; 69 | picker.delegate = self; 70 | picker.sourceType = UIImagePickerControllerSourceTypeCamera; 71 | picker.showsCameraControls = YES; 72 | 73 | #ifdef DEBUG 74 | [picker mockCameraWithImageURL:@"http://nrocy.github.com/testcard.jpg"]; 75 | #endif 76 | 77 | [self presentModalViewController:picker animated:YES]; 78 | 79 | [picker release]; 80 | } 81 | 82 | -(IBAction) cancelButton 83 | { 84 | UIImagePickerController *picker = [[UIImagePickerController alloc] init]; 85 | picker.delegate = self; 86 | picker.sourceType = UIImagePickerControllerSourceTypeCamera; 87 | picker.showsCameraControls = YES; 88 | 89 | #ifdef DEBUG 90 | [picker mockCancelWithDelay:2.0]; 91 | #endif 92 | 93 | [self presentModalViewController:picker animated:YES]; 94 | 95 | [picker release]; 96 | 97 | } 98 | 99 | #pragma mark - 100 | #pragma mark Unused methods 101 | 102 | 103 | /* 104 | // Override to allow orientations other than the default portrait orientation. 105 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 106 | // Return YES for supported orientations 107 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 108 | } 109 | */ 110 | 111 | 112 | /* 113 | // The designated initializer. Override to perform setup that is required before the view is loaded. 114 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 115 | if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { 116 | // Custom initialization 117 | } 118 | return self; 119 | } 120 | */ 121 | 122 | /* 123 | // Implement loadView to create a view hierarchy programmatically, without using a nib. 124 | - (void)loadView { 125 | } 126 | */ 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /demo/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D571 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | CameraTestViewController 45 | 46 | 47 | 1 48 | 49 | IBCocoaTouchFramework 50 | NO 51 | 52 | 53 | 54 | 292 55 | {320, 480} 56 | 57 | 1 58 | MSAxIDEAA 59 | 60 | NO 61 | NO 62 | 63 | IBCocoaTouchFramework 64 | YES 65 | 66 | 67 | 68 | 69 | YES 70 | 71 | 72 | delegate 73 | 74 | 75 | 76 | 4 77 | 78 | 79 | 80 | viewController 81 | 82 | 83 | 84 | 11 85 | 86 | 87 | 88 | window 89 | 90 | 91 | 92 | 14 93 | 94 | 95 | 96 | 97 | YES 98 | 99 | 0 100 | 101 | 102 | 103 | 104 | 105 | -1 106 | 107 | 108 | File's Owner 109 | 110 | 111 | 3 112 | 113 | 114 | CameraTest App Delegate 115 | 116 | 117 | -2 118 | 119 | 120 | 121 | 122 | 10 123 | 124 | 125 | 126 | 127 | 12 128 | 129 | 130 | 131 | 132 | 133 | 134 | YES 135 | 136 | YES 137 | -1.CustomClassName 138 | -2.CustomClassName 139 | 10.CustomClassName 140 | 10.IBEditorWindowLastContentRect 141 | 10.IBPluginDependency 142 | 12.IBEditorWindowLastContentRect 143 | 12.IBPluginDependency 144 | 3.CustomClassName 145 | 3.IBPluginDependency 146 | 147 | 148 | YES 149 | UIApplication 150 | UIResponder 151 | CameraTestViewController 152 | {{234, 376}, {320, 480}} 153 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 154 | {{525, 346}, {320, 480}} 155 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 156 | CameraTestAppDelegate 157 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 158 | 159 | 160 | 161 | YES 162 | 163 | 164 | YES 165 | 166 | 167 | 168 | 169 | YES 170 | 171 | 172 | YES 173 | 174 | 175 | 176 | 15 177 | 178 | 179 | 180 | YES 181 | 182 | UIWindow 183 | UIView 184 | 185 | IBUserSource 186 | 187 | 188 | 189 | 190 | CameraTestAppDelegate 191 | NSObject 192 | 193 | YES 194 | 195 | YES 196 | viewController 197 | window 198 | 199 | 200 | YES 201 | CameraTestViewController 202 | UIWindow 203 | 204 | 205 | 206 | YES 207 | 208 | YES 209 | viewController 210 | window 211 | 212 | 213 | YES 214 | 215 | viewController 216 | CameraTestViewController 217 | 218 | 219 | window 220 | UIWindow 221 | 222 | 223 | 224 | 225 | IBProjectSource 226 | Classes/CameraTestAppDelegate.h 227 | 228 | 229 | 230 | CameraTestAppDelegate 231 | NSObject 232 | 233 | IBUserSource 234 | 235 | 236 | 237 | 238 | CameraTestViewController 239 | UIViewController 240 | 241 | IBProjectSource 242 | Classes/CameraTestViewController.h 243 | 244 | 245 | 246 | 247 | YES 248 | 249 | NSObject 250 | 251 | IBFrameworkSource 252 | Foundation.framework/Headers/NSError.h 253 | 254 | 255 | 256 | NSObject 257 | 258 | IBFrameworkSource 259 | Foundation.framework/Headers/NSFileManager.h 260 | 261 | 262 | 263 | NSObject 264 | 265 | IBFrameworkSource 266 | Foundation.framework/Headers/NSKeyValueCoding.h 267 | 268 | 269 | 270 | NSObject 271 | 272 | IBFrameworkSource 273 | Foundation.framework/Headers/NSKeyValueObserving.h 274 | 275 | 276 | 277 | NSObject 278 | 279 | IBFrameworkSource 280 | Foundation.framework/Headers/NSKeyedArchiver.h 281 | 282 | 283 | 284 | NSObject 285 | 286 | IBFrameworkSource 287 | Foundation.framework/Headers/NSObject.h 288 | 289 | 290 | 291 | NSObject 292 | 293 | IBFrameworkSource 294 | Foundation.framework/Headers/NSRunLoop.h 295 | 296 | 297 | 298 | NSObject 299 | 300 | IBFrameworkSource 301 | Foundation.framework/Headers/NSThread.h 302 | 303 | 304 | 305 | NSObject 306 | 307 | IBFrameworkSource 308 | Foundation.framework/Headers/NSURL.h 309 | 310 | 311 | 312 | NSObject 313 | 314 | IBFrameworkSource 315 | Foundation.framework/Headers/NSURLConnection.h 316 | 317 | 318 | 319 | NSObject 320 | 321 | IBFrameworkSource 322 | UIKit.framework/Headers/UIAccessibility.h 323 | 324 | 325 | 326 | NSObject 327 | 328 | IBFrameworkSource 329 | UIKit.framework/Headers/UINibLoading.h 330 | 331 | 332 | 333 | NSObject 334 | 335 | IBFrameworkSource 336 | UIKit.framework/Headers/UIResponder.h 337 | 338 | 339 | 340 | UIApplication 341 | UIResponder 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UIApplication.h 345 | 346 | 347 | 348 | UIResponder 349 | NSObject 350 | 351 | 352 | 353 | UISearchBar 354 | UIView 355 | 356 | IBFrameworkSource 357 | UIKit.framework/Headers/UISearchBar.h 358 | 359 | 360 | 361 | UISearchDisplayController 362 | NSObject 363 | 364 | IBFrameworkSource 365 | UIKit.framework/Headers/UISearchDisplayController.h 366 | 367 | 368 | 369 | UIView 370 | 371 | IBFrameworkSource 372 | UIKit.framework/Headers/UITextField.h 373 | 374 | 375 | 376 | UIView 377 | UIResponder 378 | 379 | IBFrameworkSource 380 | UIKit.framework/Headers/UIView.h 381 | 382 | 383 | 384 | UIViewController 385 | 386 | IBFrameworkSource 387 | UIKit.framework/Headers/UINavigationController.h 388 | 389 | 390 | 391 | UIViewController 392 | 393 | IBFrameworkSource 394 | UIKit.framework/Headers/UIPopoverController.h 395 | 396 | 397 | 398 | UIViewController 399 | 400 | IBFrameworkSource 401 | UIKit.framework/Headers/UISplitViewController.h 402 | 403 | 404 | 405 | UIViewController 406 | 407 | IBFrameworkSource 408 | UIKit.framework/Headers/UITabBarController.h 409 | 410 | 411 | 412 | UIViewController 413 | UIResponder 414 | 415 | IBFrameworkSource 416 | UIKit.framework/Headers/UIViewController.h 417 | 418 | 419 | 420 | UIWindow 421 | UIView 422 | 423 | IBFrameworkSource 424 | UIKit.framework/Headers/UIWindow.h 425 | 426 | 427 | 428 | 429 | 0 430 | IBCocoaTouchFramework 431 | 432 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 433 | 434 | 435 | 436 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 437 | 438 | 439 | YES 440 | CameraTest.xcodeproj 441 | 3 442 | 112 443 | 444 | 445 | -------------------------------------------------------------------------------- /demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CameraTest 4 | // 5 | // Created by Paul King on 24/06/2010. 6 | // Copyright Paul King 2010. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | --------------------------------------------------------------------------------