SkillAgentSearch skills...

Pellicola

A replacement for UIImagePickerController with multiselection support.

Install / Use

/learn @Subito-it/Pellicola
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <img src="Resources/logo.png" width=80%/> </p>

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.

View on GitHub
GitHub Stars8
CategoryCustomer
Updated6y ago
Forks0

Languages

Swift

Security Score

60/100

Audited on Nov 25, 2019

No findings