From 6a44bbdb888f256406ed06572ed06685adbfc091 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 18 Oct 2025 12:48:33 +0900 Subject: [PATCH] Fix insetting calcs for top bar --- Objective-C/TOCropViewController/TOCropViewController.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Objective-C/TOCropViewController/TOCropViewController.m b/Objective-C/TOCropViewController/TOCropViewController.m index 4e5d1ef5..8816a219 100755 --- a/Objective-C/TOCropViewController/TOCropViewController.m +++ b/Objective-C/TOCropViewController/TOCropViewController.m @@ -423,7 +423,11 @@ - (void)adjustCropViewInsets if (!self.verticalLayout) { insets.left = CGRectGetMaxX(self.toolbar.frame); } else { - insets.bottom = CGRectGetHeight(self.view.frame) - CGRectGetMinY(self.toolbar.frame); + if (self.toolbarPosition == TOCropViewControllerToolbarPositionTop) { + insets.top = CGRectGetMinY(self.toolbar.frame); + } else { + insets.bottom = CGRectGetHeight(self.view.frame) - CGRectGetMinY(self.toolbar.frame); + } } }