SCCaptureCamera
ScreenShots:
Description:
1 | A Custom Camera with AVCaptureSession to take a square picture. |
Codes:
Usage:
0、Import four frameworks:
1 | CoreMedia.framework、QuartzCore.framework、AVFoundation.framework、ImmageIO.framework |
1、Drag “SCCaptureCamera” and “SCCommon” to your project.
2、Import “SCNavigationController.h” and code like this:
1 | SCNavigationController *nav = [[SCNavigationController alloc] init]; |
3、After take a picture, you can call back with delegate or a notification.
- delegate:
1 | - (void)didTakePicture:(SCNavigationController *)navigationController |
- notification:
1 | add a notification whose name is kNotificationTakePicture |
Finally, set SWITCH_SHOW_DEFAULT_IMAGE_FOR_NONE_CAMERA
which is in the file SCCaptureCameraController.m
to 0
, it is just a joke for the devices which cannot take a picture.
Author: Arvit
Link: https://arvit.xyz/2014/02/24/github-capture-camera/
License: 知识共享署名-非商业性使用 4.0 国际许可协议