Hi
I want to open a modal sheet so it's centered when the iPhone Duo is opened, but on the right side of the screen (trailing) when it's half-closed.
But it seems like the "placement" property of the sheetPresentationController applies in all configurations.
Is there a way to set a placement "order" (centered if possible, then trailing, then leading) ?
Hi @Raph_ab,
Could you please explain a bit more about your requirements?
All sheets move to the leading edge when folded, and are presented in the center when the inner display is opened flat. Regardless, a majority of the center area is still covered by the presented sheet, so why is the trailing edge preferred over the leading edge?
The placement API applies the position of the sheet at all times, not specifically when folded. Please submit an enhancement request, via Feedback Assistant, to expose an API to achieve this behavior, including your specific business needs for this layout. Once submitted, please respond here with the Feedback ID.
As a workaround, you could use the reserved region API to detect an active division region, then set your placement based on its existence. To learn more about this API family, please see the post below:
How to know when active regions are changing?
https://developer.apple.com/forums/thread/847876?answerId=906445022#906445022
Cheers,
Paris X Pinkney | WWDR | DTS Engineer