Displays a live camera window similar to FaceTime.
Objective-C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
FaceCamTest.xcodeproj
FaceCamTest
FaceCamViewer.h
FaceCamViewer.m
README.md

README.md

FaceCamViewer

Displays a live camera feed similar to FaceTime.

FaceCamViewer Example

Requirements

  • AVFoundation.framework
  • QuartzCore.framework

Usage

Copy FaceCamViewer.h and FaceCamViewer.m into your project.

Import #import "FaceCamViewer.h" where you want to display the camera feed.

Basic Implementation:

FaceCamViewer *viewer = [[FaceCamViewer alloc] initWithDeviceType:IPHONE3x5];
[viewer startFaceCam];
[self.view addSubview:viewer];

Implementation with options:

FaceCamViewer *viewer3 = [[FaceCamViewer alloc] initWithFrame:CGRectMake(190, 290, 120, 160)];
viewer3.cameraType = AVCaptureDevicePositionBack;

AVCaptureSession *session = [[AVCaptureSession alloc] init];
viewer3.session = session; 

viewer3.draggable = YES;

[viewer3 startFaceCam];
[self.view addSubview:viewer3];

Options

initWithDeviceType - sets predetermined camera view frame

  • IPHONE3x5
  • IPHONE4
  • IPAD

cameraType (Optional)

  • AVCaptureDevicePositionFront (default)
  • AVCaptureDevicePositionBack

session (Optional) - sets AVCaptureSession

draggable (Optional) - allows view to be draggable

Contact

Jason Everett

##License MIT License - fork, modify and use however you want.