I am working on an iOS project using UIKit, and I am implementing a UISheetPresentationController. My goal is to keep the sheet fixed on the current page. However, when I navigate to a new page (e.g., pushing a new UIViewController), I want the sheet to stay hidden in the background and not be visible on the new page. Essentially, I want the sheet to be tied to the current page and not appear or interfere with the navigation flow to other pages.
How can I achieve this behavior? Is there a specific way to control the visibility of UISheetPresentationController when navigating between pages in a UIKit project? Any suggestions or best practices would be greatly appreciated.
I'm attaching a sample video for reference.
