CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ | 
| LangLanguage | SwiftSwift | 
| License | MIT | 
| ReleasedLast Release | Aug 2017 | 
| SwiftSwift Version | 3.0 | 
| SPMSupports SPM | ✗ | 
Maintained by pikachu987.
To run the example project, clone the repo, and run pod install from the Example directory first.
PKCCropHelper.shared.degressBeforeImage = UIImage(named: "pkc_crop_rotate_left.png")
PKCCropHelper.shared.degressAfterImage = UIImage(named: "pkc_crop_rotate_right.png")
PKCCropHelper.shared.isNavigationBarShow = false
let cropVC = PKCCrop().cropViewController(UIImage(named: "image.jpeg")!)
cropVC.delegate = self
self.present(cropVC, animated: true, completion: nil)
 
extension ViewController: PKCCropDelegate{
    //return Crop Image & Original Image
    func pkcCropImage(_ image: UIImage?, originalImage: UIImage?) {
    }
    //If crop is canceled
    func pkcCropCancel(_ viewController: PKCCropViewController) {
        viewController.navigationController?.popViewController(animated: true)
    }
    //Successful crop
    func pkcCropComplete(_ viewController: PKCCropViewController) {
        if viewController.tag == 0{
            viewController.navigationController?.popViewController(animated: true)
        }else{
            viewController.dismiss(animated: true, completion: nil)
        }
    }
}
 PKCCrop is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PKCCrop"pikachu987, [email protected]
PKCCrop is available under the MIT license. See the LICENSE file for more info.