BSMediaPicker 0.3.0

BSMediaPicker 0.3.0

Maintained by Brandon Joel Stillitano.



  • By
  • Brandon Stillitano

BSMediaPicker

Welcome to BSMediaPicker, a UI/UX framework for allowing users to quickly and easily select photos and/or videos from their device library as well as other third party applications. The libary implements both a UIImagePickerController and a UIDocumentPickerViewController to achieve this.

License CocoaPods Compatible Twitter Platform

Screenshots

Features

  • Able to set picker type on the fly (photo only, video only, photo and video)
  • Pre-built UI (no customisation....YET)
  • Implements the default UIImagePickerControllerDelegate and UIDocumentPickerDelegate into a handy single MediaPickerDelegate

Usage

import BSMediaPicker

class ViewController: UIViewController{
  //MediaPicker must be global to your class for delegate methods to work.
  //ARC will remove it from memory if you make it local to your function.
  var mediaPicker: MediaPicker = MediaPicker()
  
  func foo() {
    //Set your delegate here to handle media selection
    mediaPicker.delegate = self
    
    //Show your picker using any of the following
    mediaPicker.showMediaPicker(from: self) //This will show a picker with photos and videos
    //OR
    mediaPicker.showMediaPicker(from: self, type: .photos)
    //OR
    mediaPicker.showMediaPicker(from: self, type: .videos)
    //OR
    mediaPicker.showMediaPicker(from: self, type: .photosVideos) //This is the default if you don't specify a type.
  }
}

Requirements

  • iOS 11.0+
  • Xcode 9.0+

Communication

  • If you need help, use Stack Overflow. (Tag 'bsmediapicker')
  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, and can provide steps to reliably reproduce it, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

Embedded frameworks require a minimum deployment target of iOS 11+.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate BSMediaPicker's features into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!

pod 'BSMediaPicker', '~> 0.1.0'

Then, run the following command:

$ pod install

Change Log

BSMediaPicker is a growing project and will encounter changes throughout its development. It is recommended that the Change Log be reviewed prior to updating versions.

License

The MIT License (MIT)

Copyright (C) 2020, Brandon Joel Stillitano All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.