File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Objective-C/TOCropViewController Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -281,10 +281,18 @@ - (CGRect)frameForToolbarWithVerticalLayout:(BOOL)verticalLayout
281
281
282
282
CGRect frame = CGRectZero;
283
283
if (!verticalLayout) { // In landscape laying out toolbar to the left
284
- frame.origin .x = insets.left ;
285
- frame.origin .y = 0 .0f ;
286
- frame.size .width = kTOCropViewControllerToolbarHeight ;
287
- frame.size .height = CGRectGetHeight (self.view .frame );
284
+ if (@available (iOS 26.0 , *)) {
285
+ CGFloat minPadding = 8 .0f ;
286
+ frame.origin .x = insets.left + minPadding;
287
+ frame.origin .y = minPadding;
288
+ frame.size .width = kTOCropViewControllerToolbarHeight ;
289
+ frame.size .height = CGRectGetHeight (self.view .frame ) - (minPadding * 2 .0f );
290
+ } else {
291
+ frame.origin .x = insets.left ;
292
+ frame.origin .y = 0 .0f ;
293
+ frame.size .width = kTOCropViewControllerToolbarHeight ;
294
+ frame.size .height = CGRectGetHeight (self.view .frame );
295
+ }
288
296
}
289
297
else {
290
298
// On iOS 26, the safe area insets values are the same, however the default bottom value is so
@@ -297,7 +305,7 @@ - (CGRect)frameForToolbarWithVerticalLayout:(BOOL)verticalLayout
297
305
// I've filed FB20413789 with Apple hoping that this can become a real solution in future.
298
306
if (@available (iOS 26.0 , *)) {
299
307
if (insets.bottom > 0 .0f ) {
300
- insets.bottom = 24 .0f ;
308
+ insets.bottom = 20 .0f ;
301
309
} else {
302
310
insets.bottom = 8 .0f ;
303
311
}
You can’t perform that action at this time.
0 commit comments