Skip to content

ujeshpatel/MediaPicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

MediaPicker

Platform : iOS

MediaPicker Help to pick Image and video from Photos or Camera Source

copy 'MediaPickerHelper.swift' File in your Project

For select Video From iPhone

        //Init Picker Methods
        mediaPickerhelper = MediaPickerHelper(viewController: self, isForVideo : true, imageCallback: nil, videoCallback: {
            url in
            self.lblURL.text = "\(url!)"
        })
        
        // it's Optional
        mediaPickerhelper?.titleForActionSheet = "Select option for upload Video"
        mediaPickerhelper?.titleForCameraButton = "From Camera"
        mediaPickerhelper?.titleForPhotosButton = "From Photos"
       
        //For Display action sheet
        mediaPickerhelper?.showPhotoSourceSelection()
    }

For select Image From iPhone

        //Init Picker Methods
        mediaPickerhelper = MediaPickerHelper(viewController: self, isForVideo : false, imageCallback: {
            image in
            self.imgView.image = image
        }, videoCallback: nil)
        
        // it's Optional
        mediaPickerhelper?.titleForActionSheet = "Select option for upload Image"
        mediaPickerhelper?.titleForCameraButton = "by Camera"
        mediaPickerhelper?.titleForPhotosButton = "by Photos"
        
        //For Display action sheet
        mediaPickerhelper?.showPhotoSourceSelection()
        
    }

TODO TASK:

  1. Set Limits with max seconds in video option (like only 30sec video needed)

Thank you

About

Media (Photo and Video) Picker helper

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages