SWPhotoEditor s a simple photo editor for iOS. SWPhotoEditor allows users to cropping, drawing and typing.
- Cropping
- Drawing with colors
- Typing with colors
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate SWPhotoEditor, just add to the Podfile of your project:
pod 'PhotoEditor', :git => 'https://github.com/Bezlepkin/SWPhotoEditor.git'
Then, run the following command:
$ pod install
The PhotoEditorViewController
.
let photoEditor = PhotoEditorViewController()
// PhotoEditorDelegate
photoEditor.photoEditorDelegate = self
// The image to be edited
photoEditor.image = image
// Present the View Controller
photoEditor.modalPresentationStyle = .fullScreen
self.present(photoEditor, animated: true, completion: nil)
The PhotoEditorDelegate
methods.
func doneEditing(image: UIImage) {
// the edited image
}
func canceledEditing() {
print("Canceled")
}
Written by Igor Bezlepkin, inspired by Mohamed Hamed.
Released under the MIT License.