SHCameraSession 0.0.1

SHCameraSession 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by ShengHuaWu.



  • By
  • ShengHua Wu

Configure the camera of a device by the AVFoundation framework. Because this class is abstract, please use the concrete subclasses SHCaptureCameraSession and SHVideoCameraSession instead of this class.

Properties and Methods

You can access the AVCaptureSession directly.

@property (nonatomic, strong) AVCaptureSession *session;

The concrete subclass should create the device and camera input.

@property (nonatomic, strong) AVCaptureDevice *device;

Create the capture video preview layer and add it into a view.

- (UIView *)cameraViewWithFrame:(CGRect)frame;

Adjust the focus, exposure and while balance of the camera at the point that is inside a given rect.

- (void)adjustCameraStatusAtPoint:(CGPoint)point inRect:(CGRect)rect;

Crop the camera image with a given region that is inside a particular rect.

- (UIImage *)cropCameraImage:(UIImage *)image withRegion:(CGRect)cropRegion inRect:(CGRect)rect;