Skip to content
AttachmentInput is image picker keyboard.
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.
AttachmentInput.xcworkspace
AttachmentInput
Example
.gitignore
AttachmentInput.gif
AttachmentInput.png
AttachmentInput.podspec
Gemfile
Gemfile.lock
LICENSE
Podfile
Podfile.lock
README.md

README.md

📷 AttachmentInput

AttachmentInput is a photo attachment keyboard.It is similar to the keyboard for photo attachment of iOS 11 Messenger.

🍱 Supported Features

  • Shoot a photo on the keyboard
  • Pick image/video on the keyboard
  • Pick image/video from UIImagePickerController
  • Download and attach image/video stored on iCloud
  • Compress image/video
  • Get the image/video file name, file size, thumbnail image
  • Provides custom features

⚓ Requirements

AttachmentInput is written in Swift 4.2. Compatible with iOS 10.0+

🏃 Install

Add this to your CocoaPods Podfile.

pod 'AttachmentInput'

🛠️ Usage

  1. Add privacy properties in info.plist with a usage description

    • Privacy - Photo Library Usage Description
    • Privacy - Microphone Usage Description
    • Privacy - Camera Usage Description
  2. Create AttachmentInput instance

    let attachmentInput = AttachmentInput()
  3. By returning AttachmentInput#view at inputview you can display the keyboard in the class that inherited UIResponder

    override var inputView: UIView? {
        return attachmentInput.view
    }
  4. Define the behavior when receive the photos in AttachmentInputDelegate and set it to AttachmentInput

    attachmentInput.delegate = self
  5. If you need to use your config, you can pass the config as you create instance

    let config = AttachmentInputConfiguration()
    config.videoQuality = .typeLow
    attachmentInput = AttachmentInput(configuration: config)

🖋️ License

MIT

You can’t perform that action at this time.