Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1602,12 +1602,28 @@ UIImage GetEmptyBackIndicatorImage()
return empty;
}

/// <summary>
/// Called when the view controller's view transitions to a new size.
/// On iPad iOS 26+, manually updates TitleView frame to handle Stage Manager window resizing.
/// </summary>
public override void ViewWillTransitionToSize(SizeF toSize, IUIViewControllerTransitionCoordinator coordinator)
{
base.ViewWillTransitionToSize(toSize, coordinator);

if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
{
UpdateLeftBarButtonItem();

// For iOS 26+, force TitleView to re-layout on window size changes (iPad Stage Manager, multitasking)
// Complements TraitCollectionDidChange handling (device rotation) added in #32815
if (OperatingSystem.IsIOSVersionAtLeast(26) || OperatingSystem.IsMacCatalystVersionAtLeast(26))
{
coordinator.AnimateAlongsideTransition(_ =>
{
UpdateTitleViewFrameForOrientation();
}, null);
}
}
}

public override void TraitCollectionDidChange(UITraitCollection previousTraitCollection)
Expand Down
Loading