Skip to content

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

Notifications You must be signed in to change notification settings

ManishaJoshi-mj/MJMediaPicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

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 !!