Skip to content

Conversation

@TimOliver
Copy link
Owner

It looks like button.bounds changed between iOS 18 and iOS 26 and this is what was causing the layout issue.

The icons were always 44x44 in size, and so I've unblocked it for now by hardcoding the size.

This fixes the issue, but the library will definitely need a bit of a redesign to look native on iOS 26.

@TimOliver TimOliver requested a review from Copilot July 30, 2025 16:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a toolbar icon layout issue on iOS 26 by hardcoding the button height to 44 points, working around changes to button.bounds behavior between iOS 18 and iOS 26.

Key Changes

  • Hardcoded the height calculation for horizontal toolbar layout to use 44.0f instead of CGRectGetHeight(button.bounds)
Comments suppressed due to low confidence (1)

Objective-C/TOCropViewController/Views/TOCropToolbar.m:297

  • iOS 26 does not exist. As of January 2025, the latest iOS version is iOS 18. This appears to be a typo and should likely reference a valid iOS version.
            CGFloat sameOffset = horizontally ? fabs(CGRectGetHeight(containerRect)-44.0f) : fabs(CGRectGetWidth(containerRect)-CGRectGetWidth(button.bounds));

@TimOliver TimOliver merged commit d84ce2e into main Jul 30, 2025
1 check passed
@TimOliver TimOliver deleted the ios26-fix branch July 30, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants