Skip to content
プロジェクト

sprint84/PhotoCropEditor

GitHubで見る

概要

Framework written in Swift for Cropping Images easily

デザイン・メディア

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

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.

関連プロジェクトを探す

読み込み中…