Skip to content

Commit

Permalink
(ios) changing images sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
ivpusic committed Jan 19, 2020
1 parent 9a5dedf commit d51e089
Show file tree
Hide file tree
Showing 10 changed files with 1,517 additions and 1,317 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ ImagePicker.clean().then(() => {
| loadingLabelText (ios only) | string (default "Processing assets...") | Text displayed while photo is loading in picker |
| mediaType | string (default any) | Accepted mediaType for image selection, can be one of: 'photo', 'video', or 'any' |
| showsSelectedCount (ios only) | bool (default true) | Whether to show the number of selected assets |
| sortOrder (ios only) | string (default 'none', supported values: 'asc', 'desc', 'none') | Applies a sort order on the creation date on how media is displayed within the albums/detail photo views when opening the image picker |
| forceJpg (ios only) | bool (default false) | Whether to convert photos to JPG. This will also convert any Live Photo into its JPG representation |
| showCropGuidelines (android only) | bool (default true) | Whether to show the 3x3 grid on top of the image during cropping |
| showCropFrame (android only) | bool (default true) | Whether to show crop frame during cropping |
Expand Down Expand Up @@ -198,7 +199,7 @@ After this use `ios/<project_name>.xcworkspace`. **Do not use** `ios/<project_na

##### Using local QBImagePicker

It is recommended to use locally provided QBImagePicker pod, because it contains few improvements over original version.
Add following to your Podfile:

```
pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'
Expand Down
2 changes: 2 additions & 0 deletions example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default class App extends Component {
height: 500,
cropping: cropit,
cropperCircleOverlay: circular,
sortOrder: 'none',
compressImageMaxWidth: 1000,
compressImageMaxHeight: 1000,
compressImageQuality: 1,
Expand All @@ -134,6 +135,7 @@ export default class App extends Component {
ImagePicker.openPicker({
multiple: true,
waitAnimationEnd: false,
sortOrder: 'desc',
includeExif: true,
forceJpg: true,
}).then(images => {
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ target 'example' do
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

pod 'QBImagePickerController', :path => '../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec'

use_native_modules!
end
10 changes: 6 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ PODS:
- React-cxxreact (= 0.61.2)
- React-jsi (= 0.61.2)
- ReactCommon/jscallinvoker (= 0.61.2)
- RNImageCropPicker (0.25.3):
- RNImageCropPicker (0.26.3):
- QBImagePickerController
- React-Core
- React-RCTImage
Expand All @@ -237,6 +237,7 @@ DEPENDENCIES:
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- QBImagePickerController (from `../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
- React (from `../node_modules/react-native/`)
Expand Down Expand Up @@ -266,7 +267,6 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- boost-for-react-native
- QBImagePickerController
- RSKImageCropper

EXTERNAL SOURCES:
Expand All @@ -280,6 +280,8 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
QBImagePickerController:
:path: "../node_modules/react-native-image-crop-picker/ios/QBImagePicker/QBImagePickerController.podspec"
RCTRequired:
:path: "../node_modules/react-native/Libraries/RCTRequired"
RCTTypeSafety:
Expand Down Expand Up @@ -353,10 +355,10 @@ SPEC CHECKSUMS:
React-RCTText: e3ef6191cdb627855ff7fe8fa0c1e14094967fb8
React-RCTVibration: fb54c732fd20405a76598e431aa2f8c2bf527de9
ReactCommon: 5848032ed2f274fcb40f6b9ec24067787c42d479
RNImageCropPicker: bfb3ea9c8622f290532e2fe63f369e0d5a52f597
RNImageCropPicker: 8a993e3b6730f7e0d723b4dc5984907ac332f5d4
RSKImageCropper: a446db0e8444a036b34f3c43db01b2373baa4b2a
Yoga: 14927e37bd25376d216b150ab2a561773d57911f

PODFILE CHECKSUM: 61ffb4ec62885bf26d3320925ac20ddbefc82e79
PODFILE CHECKSUM: 39fe1408e793fbdebf591bcd10d0013cb2170da9

COCOAPODS: 1.8.3
Loading

0 comments on commit d51e089

Please sign in to comment.