FittedSheets icon indicating copy to clipboard operation
FittedSheets copied to clipboard

Non-Interactive UI after presenting another view controller from bottom sheet

Open omidgolparvar opened this issue 2 years ago • 4 comments

Consider this codes:

class AViewController {
    ...
    func presentB() {
        let controller = BViewController()
        let sheetController = SheetViewController(
	        controller: controller,
	        sizes: [.fixed(500)]
        )
        
        sheetController.didDismiss = { sheetController in
	        print(#function, "SheetController.didDismiss.")
        }
        
        present(sheetController, animated: true, completion: nil)
    }
}

class BViewController {
    ...
    func presentAnother() {
        let controller = AnotherViewController()
        controller.modalPresentationStyle = .fullScreen
        
        present(sheetController, animated: true, completion: nil)
    }
}

When the view controller presented using SheetViewController, tries to present another view controller modally, it seems that bottom sheet is dismissed, but its transition view will remain in view hierarchy and it robs all touch interactions.

Screen Shot 2022-02-28 at 3 37 01 PM

After presenting AnotherViewController, print(#function, "SheetController.didDismiss.") will execute.

omidgolparvar avatar Feb 28 '22 12:02 omidgolparvar

any idea ?

devSC avatar Apr 22 '22 09:04 devSC

Use inline mode = true Solved For me

Vidur15 avatar Aug 22 '22 11:08 Vidur15

@omidgolparvar you find a solution?

alexeymilakhin avatar Oct 26 '22 22:10 alexeymilakhin

@omidgolparvar Did you find a solution? @gordontucker any idea how to resolve this please? I got the same and @Vidur15 solution didn't work in my case.

guyaumetremblay avatar Jan 24 '23 14:01 guyaumetremblay