wordpress-mobile / MediaPicker-iOS

WPMediaPicker is an iOS controller that allows capture and picking of media assets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor the multiple options on WPMediaPickerViewController to a single struct/class

SergioEstevao opened this issue · comments

I purpose to refactor/move to an options object, WPMediaPickerOptions, the following attributes :

  • showMostRecentFirst
  • filter
  • allowMultipleSelection
  • cameraPreviewSize
  • preferFrontCamera
  • allowCaptureOfMedia

This will allow to make it easier to add new attributes to it, and reflect them on the classes that use it like WPNavigationMediaPickerViewController and WPInputMediaPickerViewController.

The options object could be set on the init methods, but also be changed with a setter method, that will make sure the picker get's updated correctly in a single place.

Sounds like a great idea, @SergioEstevao!