Latest 0.2.4
Homepage https://github.com/pikachu987/PKCCrop
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

example Image

image
image
image

image
image

https://icons8.com/

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

– ViewController


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)

– PKCCrop Delegate


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)
        }
    }

}

Installation

PKCCrop is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "PKCCrop"

Author

pikachu987, [email protected]

License

PKCCrop is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PKCCrop",
    "version": "0.2.4",
    "summary": "Images crop",
    "description": "There are many options that can be used to easily put images into crops.",
    "homepage": "https://github.com/pikachu987/PKCCrop",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "pikachu987": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pikachu987/PKCCrop.git",
        "tag": "0.2.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PKCCrop/Classes/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This