Skip to content

dev-djcp/mjCamera

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##mjCamera A light weight & simple & easy camera for iOS by Swift.

CocoaPodslicenseSwift version

###Installation & Requirements

This project requires Xcode 8 to run and compiles with swift 3.0

CameraViewController is available on CocoaPods. Add the following to your Podfile:

pod 'mjCamera'

###Usage

To use this component couldn't be simpler. Add import CameraViewController to the top of you controller file.

let cameraViewController = CameraViewController() { image in
	guard let image = image else { //cancel
		self.dismiss(animated: true, completion: nil)
		return
	}
            
	PHAssetCollection.saveImageToAlbum(image: image, albumName: "mjCamera", completion: { assetPlaceholder, error in
		let localId = assetPlaceholder?.localIdentifier
		let assets = PHAsset.fetchAssets(withLocalIdentifiers: [localId!], options: nil)
		if let asset = assets.firstObject {
			asset.requestContentEditingInput(with: PHContentEditingInputRequestOptions()) { (input, _) in
				let url = input?.fullSizeImageURL
			}
		}
	})
}
present(cameraViewController, animated: true, completion: nil)

###License mjCamera is released under the MIT license. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 65.7%
  • Shell 30.0%
  • Ruby 2.3%
  • Objective-C 2.0%