Latest 0.1.2
Homepage https://github.com/pikachu987/CropPickerController
License MIT
Platforms ios 8.0
Dependencies CropPickerView
Authors

Version
License
Platform
Swift 4.2

Introduce

There is a single image picker controller for cropping and a multi image picker controller for selecting various images. You can select an album and it will be updated automatically when you edit the album.

Single Complex
Camera Progress

Requirements

CropPickerController written in Swift 4.2. Compatible with iOS 8.0+

Installation

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

pod 'CropPickerController'

Usage

image

import CropPickerController
let cropPickerController = CropPickerController(.single)
// let cropPickerController = CropPickerController(.complex)
cropPickerController.delegate = self
let navigationController = UINavigationController(rootViewController: cropPickerController)
present(navigationController, animated: true, completion: nil)

Init


CropPickerController(.single)
CropPickerController(.single, isCamera: true)
CropPickerController(.complex)
CropPickerController(.complex, isCamera: false)

Property

BarButtonItem


cropPickerController.leftBarButtonItem = UIBarButtonItem(title: "Back", style: .plain, target: cropPickerController, action: #selector(cropPickerController.backTap(_:)))
cropPickerController.rightBarButtonItem = UIBarButtonItem(title: "Crop", style: .done, target: cropPickerController, action: #selector(cropPickerController.cropTap(_:)))

color


cropPickerController.leftBarButtonItem?.tintColor = .black
cropPickerController.rightBarButtonItem?.tintColor = .black
cropPickerController.titleButton.setTitleColor(.black, for: .normal)

cropPickerController.cameraTintColor = .red
cropPickerController.cameraBackgroundColor = UIColor(white: 0.2, alpha: 1)

cropPickerController.pictureDimColor = UIColor(red: 242/255, green: 121/255, blue: 141/255, alpha: 0.5)

cropPickerController.selectBoxTintColor = .black
cropPickerController.selectBoxLayerColor = .gray
cropPickerController.selectBoxBackgroundColor = .gray

cropPickerController.progressTextColor = .black
cropPickerController.progressColor = .red
cropPickerController.progressTintColor = .blue
cropPickerController.progressBackgroundColor = .white

cropPickerController.cropLineColor = .blue
cropPickerController.imageBackgroundColor = .white
cropPickerController.scrollBackgroundColor = .white
cropPickerController.cropDimBackgroundColor = UIColor(white: 0, alpha: 0.9)

zoom


cropPickerController.scrollMinimumZoomScale = 0.1
cropPickerController.scrollMaximumZoomScale = 12

text


cropPickerController.permissionGalleryDeniedTitle = "Denied"
cropPickerController.permissionGalleryDeniedMessage = "Denied Gallery"
cropPickerController.permissionCameraDeniedTitle = "Denied"
cropPickerController.permissionCameraDeniedMessage = "Denied Camera"
cropPickerController.permissionActionMoveTitle = "Move~"
cropPickerController.permissionActionCancelTitle = "Cancel!"

Selector

Back and Crop


#selector(cropPickerController.backTap(_:))
#selector(cropPickerController.cropTap(_:))

Delegate


class ViewController: UIViewController{
    override func viewDidLoad() {
        super.viewDidLoad()

        let cropPickerController = CropPickerController(.single)
        cropPickerController.delegate = self
    }
}

// MARK: CropPickerDelegate
extension ViewController: CropPickerDelegate {
    func cropPickerBackAction(_ cropPickerController: CropPickerController) {

    }
    func cropPickerCompleteAction(_ cropPickerController: CropPickerController, images: [UIImage]?, error: Error?) {

    }
}

Author

pikachu987, [email protected]

License

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

Latest podspec

{
    "name": "CropPickerController",
    "version": "0.1.2",
    "summary": "There is a single image picker controller for cropping and a multi image picker controller for selecting various images.",
    "description": "There is a single image picker controller for cropping and a multi image picker controller for selecting various images. You can select an album and it will be updated automatically when you edit the album.",
    "homepage": "https://github.com/pikachu987/CropPickerController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "pikachu987": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pikachu987/CropPickerController.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.2",
    "source_files": "CropPickerController/Classes/**/*",
    "dependencies": {
        "CropPickerView": [
            "0.1.1"
        ]
    }
}

Pin It on Pinterest

Share This