测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布日期上次发布 | 2019年8月 |
SPM支持 SPM | ✗ |
维护者:[a href="/owners/21406">Mohamed Hamed。
感谢 https://github.com/sprint84/PhotoCropEditor
现在支持裁剪 💃🏻
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)
PhotoEditorDelegate
方法。
func imageEdited(image: UIImage) {
// the edited image
}
func editorCanceled() {
print("Canceled")
}
由 Mohamed Hamed 编写。
在 MIT 许可证 下发布。