Cam 1.0.2

Cam 1.0.2

Maintained by Amir Shayegh.



 
Depends on:
Extended>= 0
Designer>= 0
 

Cam 1.0.2

  • By
  • amirshayegh

Cam

CI Status Version License Platform

Example

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

Requirements

Alt Text

Installation

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

pod 'Cam', '1.0.0'

Quick Usage

  1. Import the library
import UIKit
import Cam
  1. Create a Cam object
let camera = Cam()
  1. Call Display
cam.display(on: self) { (photo) in
		
}
  1. Process Photo
cam.display(on: self) { (photo) in
	if let photo = photo {
		// Example: displaying image on an imageview for 2 seconds
		let imageView = UIImageView(frame: self.view.frame)
		imageView.contentMode = .scaleAspectFit
		imageView.image = photo.image
		self.view.addSubview(imageView)
		DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
			imageView.removeFromSuperview()
		})
	}
}

Alt Text

Author

amirshayegh, [email protected]

License

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