Latest 1.4.0
Homepage https://github.com/miller-ms/MMSCameraViewController
License MIT
Platforms ios 8.0
Frameworks UIKit, AVFoundation, Foundation
Authors

CI Status
Version
License
Platform
CocoaPods

This class presents a camera for capturing still images and returning them to the presenting view controller through a callback to the delegate. Unlike many other camera controllers, this one does not provide the functionality for presenting a new view for accepting and cropping the captured image. It leaves that feature for the application to support providing more flexibility and customization by the application.

Basic Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Import the class.

import MMSCameraViewController

To present the camera, instantiate the controller object, assign the delegate, and present the view controller:


    @IBAction func openCamera(_ sender: AnyObject) {

        let camera = MMSCameraViewController(nibName: nil, bundle: nil)

        camera.delegate = self

        present(camera, animated: true, completion: nil)

    }

To acquire the image, implement the delegate:

    func cameraDidCaptureStillImage(_ image: UIImage, camera:MMSCameraViewController) {

        imageView.image = image

        camera.dismiss(animated: true, completion: nil)

    }

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

MMSProfileImagePicker requires iOS 8.3 or later.

Installation

MMSCameraViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MMSCameraViewController"

Author

William Miller, [email protected]

License

MMSCameraViewController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MMSCameraViewController",
    "version": "1.4.0",
    "summary": "Presents a camera for capturing a still image and returns it through the delegate.",
    "description": "MMSCameraViewController provides the feature for presenting a camera to capture still images only.  It leaves the features for presenting a confirmation screen and cropping tools to the application to support.  Captured images are passed back to the presenting view controller through the delegate method.",
    "homepage": "https://github.com/miller-ms/MMSCameraViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "William Miller": "[email protected]"
    },
    "source": {
        "git": "https://github.com/miller-ms/MMSCameraViewController.git",
        "tag": "1.4.0"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MMSCameraViewController/Classes/**/*.swift",
    "resources": "MMSCameraViewController/Assets/**/*",
    "frameworks": [
        "UIKit",
        "AVFoundation",
        "Foundation"
    ]
}

Pin It on Pinterest

Share This