Latest 1.0.1
Homepage https://github.com/spf-iOS/PhotoCropEditor
License MIT
Platforms ios 8.0
Authors

PhotoCropEditor Carthage compatible [GitHub release]()

screenshot

This project is a Swift translation of the PEPhotoCropEditor. Version 1.0 doesn’t add anything new, or fixes existing bugs. I want to slowly iterate on that, and if you want to contribute, let me know.

Check it out

To run the example project, clone the repo, and open the ‘Example/Example.xcodeproj’ file.

Requirements

This component is written using Swift and Dynamic Frameworks, so iOS 8.x is required. However you may want to manually import the source files into your project, if you need to support 7.x.

Installation

ProgressButton is available through Carthage. To install
it, simply add the following line to your Cartfile:

github "sprint84/CropViewController" ~> 1.2

Installing Carthage

To install the carthage tool on your system, please download and run the Carthage.pkg file for the latest release, then follow the on-screen instructions.

Alternately, you can use Homebrew and install the carthage tool on your system simply by running brew update and brew install carthage.

For further details, please visit the Carthage Github page

Usage

First import the module into your project.

import CropViewController

You may use the view controller component, with the default buttons and appearance. We will add customization properties in the future.

let controller = CropViewController()
controller.delegate = self
controller.image = image

let navController = UINavigationController(rootViewController: controller)
presentViewController(navController, animated: true, completion: nil)

Alternatively, you can use the crop view directly, and incorporate it in your existing UI.

let cropView = CropView(frame: bounds)
view.addSubview(cropView)

Reading the cropped image

Using the delegate method on the View Controller:

func cropViewController(controller: CropViewController, didFinishCroppingImage image: UIImage) {
    controller.dismissViewControllerAnimated(true, completion: nil)
    imageView.image = image
}

Retrieving directly from the crop view

let croppedImage = cropView.croppedImage

Customization

Coming in the near future…

Author

Reefactor, Inc., [email protected]

License

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

Latest podspec

{
    "name": "SPPhotoCropEditor",
    "version": "1.0.1",
    "summary": "SPPhotoCropEditor",
    "description": "u7f16u8f91u56feu7247",
    "homepage": "https://github.com/spf-iOS/PhotoCropEditor",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "spf": "[email protected]"
    },
    "source": {
        "git": "https://github.com/spf-iOS/PhotoCropEditor.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "CropViewController/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This