项目作者: thoughtbot

项目描述 :
Simplify documents
高级语言: Swift
项目地址: git://github.com/thoughtbot/Bean.git
创建时间: 2020-02-07T17:20:06Z
项目社区:https://github.com/thoughtbot/Bean

开源协议:MIT License

下载


Bean CircleCI SwiftPM compatible Carthage compatible

A library that simplifies the way you deal with documents

Requirements

  • iOS 13.0 or later
  • Swift 4.0 or later

Supported Files

  • Image
  • Video
  • Audio
  • Text

Installation

SwiftPM

In Xcode: File > Swift Packages > Add Package Dependency
Paste: https://github.com/thoughtbot/Bean.git

Usage

A Bean is a subclass of UIDocument that is returned after documents are selected

Conforming to DocumentPickable

  1. class ViewController: UIViewController, DocumentPickable {

Present document picker

  1. self.pickDocuments()

Respond to protocal method

  1. func didPickDocument(document: Bean?) {
  2. // handle the bean
  3. }

Preview a bean

  1. self.presentPreview(document: Bean)

License

Bean is Copyright © 2020 Abe Mangona and thoughtbot. It is free
software, and may be redistributed under the terms specified in the
LICENSE file.

About thoughtbot

thoughtbot

Bean is maintained and funded by thoughtbot, inc.
The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software!
See our other projects or
hire us to design, develop, and grow your product.