Skip to content

Instantly share code, notes, and snippets.

@st3fan
Created November 23, 2009 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st3fan/241383 to your computer and use it in GitHub Desktop.
Save st3fan/241383 to your computer and use it in GitHub Desktop.
#if GAME_USE_UNDOCUMENTED_API
id cameraControllerClass = objc_getClass("PLCameraController");
if (cameraControllerClass != nil) {
id cameraController = [cameraControllerClass performSelector: @selector(sharedInstance)];
if (cameraController != nil) {
UIImage* viewImage = [cameraController performSelector: @selector(_createPreviewImage)];
if (viewImage != nil) {
[self processImage: viewImage];
}
}
}
#else
[self takePicture];
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment