TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2019 |
SPMSupports SPM | ✗ |
Maintained by Mohamed Hamed.
Thanks to https://github.com/sprint84/PhotoCropEditor
It now supports Cropping 💃🏻
The PhotoEditorViewController
.
let photoEditor = UIStoryboard(name: "PhotoEditor", bundle: Bundle(for: PhotoEditorViewController.self)).instantiateViewController(withIdentifier: "PhotoEditorViewController") as! PhotoEditorViewController
//PhotoEditorDelegate
photoEditor.photoEditorDelegate = self
//The image to be edited
photoEditor.image = image
//Stickers that the user will choose from to add on the image
photoEditor.stickers.append(UIImage(named: "sticker" )!)
//To hide controls - array of enum control
photoEditor.hiddenControls = [.crop, .draw, .share]
//Present the View Controller
present(photoEditor, animated: true, completion: nil)
The PhotoEditorDelegate
methods.
func imageEdited(image: UIImage) {
// the edited image
}
func editorCanceled() {
print("Canceled")
}
Written by Mohamed Hamed.
Released under the MIT License.