Latest 0.5.1
Homepage https://github.com/Aw79/AWCameraView
License MIT
Platforms ios 6.0, requires ARC
Frameworks Foundation, UIKit, AVFoundation, CoreMedia, CoreGraphics
Authors , ,

AWCameraView Build Status

(fork of JBCameraView)

UIView to show the camera, take a picture, preview it, return UIImage.

Even though an UIImagePickerController allows a custom overlay to override the
default camera controls, it gives you no control over its camera bounds. Instead
it captures a UIImage in full camera resolution, giving you the option to edit
as a second step.

Note: as of v0.3.0, you must specify the camera position before the camera will
activate.

Installation

pod 'AWCameraView'

Usage

Interface Builder

  • Drag a UIView into the interface and set its type to AWCameraView
  • Set its delegate to a UIViewController that implements AWCameraViewDelegate
  • Set the preferred camera position (will failover to the other one)
  • Call takePicture on AWCameraView to receive the UIImage on your delegate
  • Enable focus and exposure by setting enableFocusOnTapon AWCameraView or
  • Call focusOnPoint on AWCameraView to focus on the given point (0,0) = top-left / (1,1) = bottom-right

Code

AWCameraView *cameraView = [[AWCameraView alloc] initWithFrame:CGRect(320, 320)];
cameraView.delegate = self;
cameraView.position = AWCameraViewPositionBack;

/// Take a picture
[cameraView takePicture];

/// Enable tap-on-focus for camera-view; no need to call 'focusOnPoint'
cameraView.enableFocusOnTap = YES;

/// (Manually) focus on top-left point of camera-view
[cameraView focusOnPoint:CGPointMake(0, 0)];

/// (Manually) focus on bottom-right point of camera-view
[cameraView focusOnPoint:CGPointMake(1, 1)];

Support

Please open an issue on this repository.

Authors

License

MIT licensed – see LICENSE file

Latest podspec

{
    "name": "AWCameraView",
    "version": "0.5.1",
    "summary": "UIView to show the camera, take a picture, preview it, return UIImage",
    "homepage": "https://github.com/Aw79/AWCameraView",
    "license": "MIT",
    "authors": {
        "Andreas Woerner": "[email protected]",
        "James Billingham": "[email protected]",
        "Markos Charatzas": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Aw79/AWCameraView.git",
        "tag": "0.5.1"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "AWCameraView/*.{h,m}",
    "public_header_files": "AWCameraView/*.h",
    "frameworks": [
        "Foundation",
        "UIKit",
        "AVFoundation",
        "CoreMedia",
        "CoreGraphics"
    ]
}

Pin It on Pinterest

Share This