ManishaJoshi-mj / MJMediaPicker

A Custom Class to select media from camera ,video or photo library by just adding a single file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MJMediaPicker

A Custom Class to select media from camera ,video or photo library .

Usage

Just Drag and Drop MJMediaPicker class into your project and you are done.You can download and run the demo app for refrence.

How to use:

  1. If you need to capture image from Camera
MJMediaPicker.sharedInstance.openCamera(self, isVideo: false, showVideoOption: true) { (aImg, videoUrl, selectedType)  in
     //Perform your work accordingly
} 
  1. If you need to capture video
MJMediaPicker.sharedInstance.openCamera(self, isVideo: true, showVideoOption: true) { (aImg, videoUrl, selectedType) in
    //Perform your work accordingly
}
  1. If you need to choose media from photo library
MJMediaPicker.sharedInstance.chooseImageFromGallery(viewController: self) { (aImg, videoUrl, selectedType) in
    //Perform your work accordingly
}

default:

MJMediaPicker.sharedInstance.showCameraVideoActionSheeet(self, showVideo: true) { (aImg, videoUrl, selectedType) in
    //Perform your work accordingly
    }

HappyCoding !!

About

A Custom Class to select media from camera ,video or photo library by just adding a single file


Languages

Language:Swift 100.0%