File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Objective-C/TOCropViewController Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,12 @@ - (void)viewSafeAreaInsetsDidChange {
489489- (void )viewDidLayoutSubviews {
490490 [super viewDidLayoutSubviews ];
491491
492+ [UIView performWithoutAnimation: ^{
493+ self.toolbar .frame = [self frameForToolbarWithVerticalLayout: self .verticalLayout];
494+ [self adjustToolbarInsets ];
495+ [self .toolbar setNeedsLayout ];
496+ }];
497+
492498 self.cropView .frame = [self frameForCropViewWithVerticalLayout: self .verticalLayout];
493499 [self adjustCropViewInsets ];
494500 [self .cropView moveCroppedContentToCenterAnimated: NO ];
@@ -502,12 +508,6 @@ - (void)viewDidLayoutSubviews {
502508 self.titleLabel .frame = [self frameForTitleLabelWithSize: self .titleLabel.frame.size verticalLayout: self .verticalLayout];
503509 [self .cropView moveCroppedContentToCenterAnimated: NO ];
504510 }
505-
506- [UIView performWithoutAnimation: ^{
507- self.toolbar .frame = [self frameForToolbarWithVerticalLayout: self .verticalLayout];
508- [self adjustToolbarInsets ];
509- [self .toolbar setNeedsLayout ];
510- }];
511511}
512512
513513#pragma mark - Rotation Handling -
Original file line number Diff line number Diff line change @@ -1709,8 +1709,8 @@ - (CGRect)contentBounds {
17091709 CGRect contentRect = CGRectZero;
17101710 contentRect.origin .x = self.cropViewPadding + self.cropRegionInsets .left ;
17111711 contentRect.origin .y = self.cropViewPadding + self.cropRegionInsets .top ;
1712- contentRect.size .width = CGRectGetWidth (self.bounds ) - ((self.cropViewPadding * 2 ) + self.cropRegionInsets .left + self.cropRegionInsets .right );
1713- contentRect.size .height = CGRectGetHeight (self.bounds ) - ((self.cropViewPadding * 2 ) + self.cropRegionInsets .top + self.cropRegionInsets .bottom );
1712+ contentRect.size .width = CGRectGetWidth (self.frame ) - ((self.cropViewPadding * 2 ) + self.cropRegionInsets .left + self.cropRegionInsets .right );
1713+ contentRect.size .height = CGRectGetHeight (self.frame ) - ((self.cropViewPadding * 2 ) + self.cropRegionInsets .top + self.cropRegionInsets .bottom );
17141714 return contentRect;
17151715}
17161716
You can’t perform that action at this time.
0 commit comments