Skip to content

Commit 14f616c

Browse files
authored
Merge pull request #63 from ouabing/ios-support-select-deselect-message
feat: add selectMessage and deselectMessage on iOS
2 parents 389cd75 + dc0e5a6 commit 14f616c

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ const response = await MultipleImagePicker.openPicker(options);
118118
| autoPlay | bool | true | iOS | Auto play video |
119119
| allowedLivePhotos | bool | true | iOS | Allowed Live Photos type |
120120
| emptyMessage | string | No albums | iOS | Show string when gallery empty |
121+
| selectMessage | string | select | iOS | Show string when long pressing on image not selected |
122+
| deselectMessage | string | deselect | iOS | Show string when long pressing on image selected |
121123
| maximumMessageTitle | string | Notification | iOS | The title of the alert when the user chooses to exceed the specified number of pictures |
122124
| messageTitleButton | string | Notification | iOS | The title of button in the alert when the user chooses to exceed the specified number of pictures |
123125
| tapHereToChange | string | Tap here to change | iOS | The sub-title in navigation bar (under albums's name in iOS) |

ios/MultipleImagePicker.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ class MultipleImagePicker: NSObject, TLPhotosPickerViewControllerDelegate,UINavi
8989
MultipleImagePickerConfigure.cancelTitle = self.options["cancelTitle"] as! String;
9090
MultipleImagePickerConfigure.doneTitle = self.options["doneTitle"] as! String;
9191
MultipleImagePickerConfigure.emptyMessage = self.options["emptyMessage"] as! String;
92+
MultipleImagePickerConfigure.selectMessage = self.options["selectMessage"] as! String;
93+
MultipleImagePickerConfigure.deselectMessage = self.options["deselectMessage"] as! String;
9294
MultipleImagePickerConfigure.usedCameraButton = self.options["usedCameraButton"] as! Bool;
9395
MultipleImagePickerConfigure.usedPrefetch = self.options["usedPrefetch"] as! Bool;
9496
MultipleImagePickerConfigure.allowedLivePhotos = self.options["allowedLivePhotos"] as! Bool;

src/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export type Options = {
3030
doneTitle?: string;
3131
emptyMessage?: string;
3232
emptyImage?: Image;
33+
selectMessage?: string;
34+
deselectMessage?: string;
3335
usedCameraButton?: boolean;
3436
usedPrefetch?: boolean;
3537
previewAtForceTouch?: boolean;

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ let defaultOptions = {
1818
allowedLivePhotos: true,
1919
preventAutomaticLimitedAccessAlert: true, // newest iOS 14
2020
emptyMessage: 'No albums',
21+
selectMessage: 'select',
22+
deselectMessage: 'deselect',
2123
selectedColor: '#FB9300',
2224
maximumMessageTitle: 'Notification',
2325
maximumMessage: 'You have selected the maximum number of media allowed',

0 commit comments

Comments
 (0)