Reputation: 42710
Currently, if we perform multiple selection on PHPickerViewController
, a tick icon is being used to indicate selection.
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
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.
Upvotes: 1
Views: 1818
Reputation: 42710
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.
Upvotes: 1
Reputation: 10102
There's no public API to achieve this using PHPickerViewController
.
You may try to achieve this by hacking into view hierarchy of PHPickerViewController
, however doing so is highly discouraged and you will most likely get a rejection from App Store.
Important
You can’t subclass
PHPickerViewController
because its view hierarchy is private and not accessible through the public API.
You need to implement your own custom solution OR use a 3rd party library to do this.
Upvotes: 0