Skip to content
A replacement for UIImagePickerController with multiselection support.
Swift Objective-C Ruby C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Pellicola
Resources
.gitignore
.travis.yml
LICENSE
Pellicola.podspec
README.md
_Pods.xcodeproj

README.md

Version License Platform

A replacement for UIImagePickerController with multiple selection support written in Swift.

Features
Replace UIImagePickerController adding support to multiple selection
👨🏻‍💻 Written in Swift with full Objective-C compatibility
☁️ iCloud Photo Library support
🎨 Customize the UI for your app
🌍 Open to string localization

We use the open source version master branch in the Subito app.


Requirements

  • Xcode 10.0+
  • iOS 9.0+
  • Swift 4.2+
  • Interoperability with Objective-C

Installation

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

pod 'Pellicola'

Example

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

Getting started

Create a PellicolaPresenter object with a style. We provide a DefaultPellicolaStyle object which uses a default style for Pellicola. The didSelectImages closure provides an array of selected images ordered by the user selection. The userDidCancel closure let you know if the user exits from the flow.

Use the method present(on: UIViewController, maxNumberOfSelections: Int) to show Pellicolsa and specify the maximum number of selectable images.

and userDidCancel closures to get

import UIKit
import Pellicola

class ViewController: UIViewController {
    
    var pellicolaPresenter: PellicolaPresenter!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        pellicolaPresenter = PellicolaPresenter(style: DefaultPellicolaStyle())
        
        pellicolaPresenter.didStartProcessingImages = {
            print("Processing images")
        }
        
        pellicolaPresenter.didFinishProcessingImages = { images in
            print("User selected \(images.count) images")
        }
        
        pellicolaPresenter.userDidCancel = {
            print("User did cancel the flow")
        }
        
        pellicolaPresenter.present(on: self, maxNumberOfSelections: 10)
    }
}

Authors

Contributing

Feel free to collaborate with ideas, issues and/or pull requests.

P.S. If you use Pellicola in your app we would love to hear about it!

License

Pellicola is available under the Apache License, Version 2.0. See the LICENSE file for more info.

You can’t perform that action at this time.