carousell / pickle

Carousell flavoured image picker with multiple photo selections.
https://carousell.github.com/pickle
Apache License 2.0
60 stars 25 forks source link

Suggession for Dynamic Label Count Change #14

Open ErAshu opened 7 years ago

ErAshu commented 7 years ago

Hello, I found a minor issue. I set the max selection 10. let allowedSelections: ImagePickerSelection? = .limit(to: 10)

It should be reflect on CarousellImagePickerController Subtitle. See Screenshot.

img_0363

shujin commented 7 years ago

Good catch! Would you like to submit a PR for this? :)

ErAshu commented 7 years ago

One more thing, i want to change the content and image of this. Please guide from where i can do this? 8b2ea10f-3be1-4562-b17a-4d0c4b52c344

bcylin commented 7 years ago

The hint text is not related to the ImagePickerSelection, it's a separated property which can be set to any NSAttributedString.

The customization for the screen of PHAuthorizationStatus.denied requires some modifications to override the behaviour in handle(photoLibraryPermission:). One of the solutions for now might be showing a different screen based on the authorization status:

switch PHPhotoLibrary.authorizationStatus() {
  case .notDetermined:
    // ask for the permission
  case .authorized:
    // only present the image picker when the permission is granted
    present(ImagePickerController(selectedAssets: []), animated: true, completion: nil)
  case .denied, .restricted:
    // present the customized screen
}
ErAshu commented 7 years ago

This is exactly i want. In which variable i have to pass the text and image. Please tell me the file name. Actually i have to place a button to open App Settings screen.

bcylin commented 7 years ago

That should be inside your class where you initialize the Pickle.ImagePickerController and present it. There isn't a variable for this customization yet. The workaround is to present your own customized view controller when the permission is .denied or .restricted.

ErAshu commented 6 years ago

How to pass selectionsLimit and hint text from viewController?