1and2papa / CTAssetsPickerController

iOS control that allows picking multiple photos and videos from user's photo library.
MIT License
2.15k stars 550 forks source link

Could you set maxPickerCount to limit select assets ? #208

Closed ihugang closed 8 years ago

ihugang commented 8 years ago

I want limit picker photo number, How can I do it ?

1and2papa commented 8 years ago

Check the demo app and there is an example

ihugang commented 8 years ago

for better user experience ,I suggest that setup a limit number, forbid users when they select photo.

1and2papa commented 8 years ago

Have you really check the sample code? It does what exactly you are talking about.

nileshpol18 commented 7 years ago
func assetsPickerController(picker: CTAssetsPickerController!, shouldSelectAsset asset: PHAsset!) -> Bool {

        return picker.selectedAssets.count < 5 ? true : false
}