Search code examples
iosswiftphotokit

Is it possible to make PHPickerViewController display multiple selection ordering number, instead of just an tick icon?


Currently, if we perform multiple selection on PHPickerViewController, a tick icon is being used to indicate selection.

enter image description here

However, such information doesn't convey information for the selection ordering.

Is it every possible, to display the ordering number? This is an example from 3rd party library - https://github.com/mikaoj/BSImagePicker

As you can see, the 3rd party library is using 1,2,3... to convey selection ordering information

enter image description here

Can we achieve the same behavior in PHPickerViewController? We prefer to use PHPickerViewController, because it doesn't need to request permission to access photo library.

Thanks.


Solution

  • Such feature is supported in iOS15 beta. Here's the respond from Apple engineer.

    Check out the new selection configuration option in the iOS 15 (beta) SDK: https://developer.apple.com/documentation/photokit/phpickerconfiguration/3752714-selection

    Aside from setting a selection limit in the configuration, you can set the selection behavior to ordered to number the selected assets.