Modal Sheet Presenting Controller Doesn't Move Back As Expected

When I present a UIViewController programmatically

Code Block swift
vc.modalPresentationStyle = .pageSheet
present(vc, animated: true, completion: nil)

the presenting view controller doesn't move at all. I expect it to move back to create a stack like in Mail (shown here)

I think it has something to do with the hierarchy, but I'm not sure how to make it so that the presenting controller moves back?

Replies

Did you try
Code Block
vc.modalPresentationStyle = .automatic


And the same for the originating vc ?
@Claude31 Yeah, with both of them .automatic, it does the same, where the sheet comes over the vc without that one moving