Latest 1.1.0
Homepage https://github.com/Meniny/Peking
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit, Photos, AVFoundation, CoreMotion
Authors

Peking

VersionAuthorBuild PassingSwift
PlatformsMIT
CocoapodsCarthageSPM

What’s this?

Peking is a tiny image picker library.

Preview

59834b3c5d654.jpg

59834b4a7058a.jpg

59834b5031654.jpg

Requirements

  • iOS 8.0+
  • Xcode 8 with Swift 3

Installation

CocoaPods

use_frameworks!
pod 'Peking'

Contribution

You are welcome to fork and submit pull requests.

License

Peking is open-sourced software, licensed under the MIT license.

Usage

import Peking

class ViewController: UIViewController, PekingDelegate {

    // ...

    func picking(_ sender: AnyObject) {
        let peking = PekingController(mode: .library, multipleSelection: true, delegate: self)
        self.present(peking, animated: true, completion: nil)
    }

    // MARK: PekingDelegate Protocol
    func peking(_ peking: PekingController, didSelectImages images: [PekingImage]) {
        print("Number of selection images: (images.count)")
        peking.dismiss(animated: true, completion: nil)
    }

    func peking(_ peking: PekingController, didCaptureVideo videoURL: URL) {
        print("video completed and output to file: (videoURL)")
        peking.dismiss(animated: true, completion: nil)
    }

    func peking(_ peking: PekingController, didCapturePhoto photo: UIImage) {
        self.imageView.image = photo
        peking.dismiss(animated: true, completion: nil)
    }

    func pekingCameraRollUnauthorized(_ peking: PekingController) {
        peking.dismiss(animated: true, completion: nil)
        print("Camera roll unauthorized")
    }

    func pekingDidDismiss(_ peking: PekingController) {
        print("Called when the PekingController dismissed")
    }

    func pekingWillDismiss(_ peking: PekingController) {
        print("Called when the close button is pressed")
    }
}

Latest podspec

{
    "name": "Peking",
    "version": "1.1.0",
    "summary": "An image picker for iOS",
    "homepage": "https://github.com/Meniny/Peking",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Elias Abel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Meniny/Peking.git",
        "tag": "1.1.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "frameworks": [
        "Foundation",
        "UIKit",
        "Photos",
        "AVFoundation",
        "CoreMotion"
    ],
    "source_files": "Peking/**/*.swift",
    "resources": [
        "Peking/Resources/Assets.xcassets",
        "Peking/Resources/**/*.xib"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This