yackle / CLImageEditor

MIT License
2.22k stars 574 forks source link

Swift Compatability #163

Closed schinj closed 7 years ago

schinj commented 7 years ago

Can I use this editor in my swift project? If yes, could you please redirect me to some documentation or something?

Thanks in advance.

yackle commented 7 years ago

You can easily install this editor with cocoapods. And then, for example,

import UIKit
import CLImageEditor

class ViewController: UIViewController, CLImageEditorDelegate {
    ...
    func showEditor() {
        guard let editor = CLImageEditor(image: UIImage(named:"a"), delegate: self) else {
            return;
        }
        self.present(editor, animated: true, completion: {});
    }
}