Add Modal functionality on MacCatalyst TitleBars #27015
Labels
area-controls-titlebar
platform/macOS 🍏
macOS / Mac Catalyst
proposal/open
s/triaged
Issue has been reviewed
Milestone
Description
In MAUI on MacCatalyst, we currently support the following UIModalPresentationStyle enums:
However, when it comes to the TitleBar, we are not able to move the modal frame with the above UIModalPresentationStyles (except OverFullScreen) and you cannot interact with the titlebar with any of these.
There are other enums that you can do this though including the UIModalPresentationCurrentContext and UIModalPresentationOverCurrentContext. With UIModalPresentationCurrentContext, the page behind it gets grayed out where as the page behind does not get grayed out with UIModalPresentationOverCurrentContext. The page behind is not interactable, but you can interact with the titlebar if you move the frame of the modal below the titlebar inside ControlsModalWrapper.ViewDidLayoutSubviews.
Example with OverCurrentContext:
OverCurrentContext.mov
Example with CurrentContext:
CurrentContextModal.mov
Public API Changes
Adding the following in src/Controls/src/Core/Platform/iOS/Extensions/Extensions.cs
Adding the following in src/Controls/src/Core/PlatformConfiguration/iOSSpecific/UIModalPresentationStyle.cs
Editing the Frame in src/Controls/src/Core/Platform/iOS/ControlsModalWrapper.cs but calculate the actual size of the titlebar
Intended Use-Case
Be able to have a custom TitleBar be seen and used when we have a modal
The text was updated successfully, but these errors were encountered: