TLTMediaSelector 3.1.2

TLTMediaSelector 3.1.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2018
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Martin Rehder.



 
Depends on:
IQAudioRecorderController= 1.2.2
StyledOverlay~> 3.2
RSKImageCropper= 2.0.0
 

  • By
  • Martin Jacob Rehder

TLTMediaSelector

A popover control to select media, such as images, inspired by and adapted from FDTake https://github.com/fulldecent/FDTake
Using SCLAlertView for the visual interaction and RSKImageCropper for optional post cropping selected images.

Features

  • easily customizable
  • Objective-C compatible

Usage

The simplest way to use the selector is as follows:

class ViewController: UIViewController {
    let mediaSelector = MediaSelection()

    override func viewDidLoad() {
        super.viewDidLoad()

        mediaSelector.didGetPhoto = {
            (photo: UIImage, info: [NSObject : AnyObject]) -> Void in
            NSLog("did get photo")
        }
    }

    @IBAction func selectImage(sender: AnyObject) {
        mediaSelector.title = "Select Image"
        mediaSelector.subtitle = "Select your image among one of these sources"
        mediaSelector.allowsMasking = true
        mediaSelector.defaultsToFrontCamera = true
        mediaSelector.buttonBackgroundColor = UIColor.init(white: 0.8, alpha: 1.0)
        mediaSelector.present()
    }

}

License

TLTMediaSelector is available under the MIT license. See the LICENSE file for more info.