Skip to content

Commit 4fc8a90

Browse files
feat(ios): add aspectRatioPickerButtonHidden prop to hide aspect ratio button
1 parent 3d5776c commit 4fc8a90

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ ImagePicker.clean()
156156
| cropperCancelText (ios only) | string (default Cancel) | Cancel button text |
157157
| cropperCancelColor (ios only) | string (default tint `iOS` color ) | HEX format color for the Cancel button. Default value is the default tint iOS color [controlled by TOCropViewController](https://github.com/TimOliver/TOCropViewController/blob/a942414508012b13102f776eb65dac655f31cabb/Objective-C/TOCropViewController/Views/TOCropToolbar.m#L433) |
158158
| cropperRotateButtonsHidden (ios only)  |           bool (default false)         | Enable or disable cropper rotate buttons |
159+
| aspectRatioPickerButtonHidden (ios only)  |           bool (default false)         | Enable or disable cropper aspect ratio button |
159160

160161
#### Smart Album Types (ios)
161162

ios/src/ImageCropPicker.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@ - (void)cropImage:(UIImage *)image {
917917
cropVC.doneButtonTitle = [self.options objectForKey:@"cropperChooseText"];
918918
cropVC.cancelButtonTitle = [self.options objectForKey:@"cropperCancelText"];
919919
cropVC.rotateButtonsHidden = [[self.options objectForKey:@"cropperRotateButtonsHidden"] boolValue];
920+
cropVC.aspectRatioPickerButtonHidden = [[self.options objectForKey:@"aspectRatioPickerButtonHidden"] boolValue];
920921

921922
cropVC.modalPresentationStyle = UIModalPresentationFullScreen;
922923
if (@available(iOS 15.0, *)) {

src/NativeImageCropPicker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export type PickerOptions = {
4545
enableRotationGesture?: boolean;
4646
disableCropperColorSetters?: boolean;
4747
useFrontCamera?: boolean;
48+
aspectRatioPickerButtonHidden?: boolean;
4849
};
4950

5051
export interface Spec extends TurboModule {

0 commit comments

Comments
 (0)