gordontucker / FittedSheets

Bottom sheets for iOS
MIT License
1.32k stars 278 forks source link

inline and fullscreen not compatible #134

Closed fridayhoney closed 1 year ago

fridayhoney commented 3 years ago

Hello !

Thanks for your jobs guys, In my navigation controller I instantiate a ViewController but it appear bellow the navigation controller Why ?

Screen: https://ibb.co/SmWQXf2

  let storyboard = UIStoryboard(name: "Relationship", bundle: nil)
        let nvc = storyboard.instantiateViewController(withIdentifier: "UserNVC") as! UINavigationController

        var options = SheetOptions()
        options.useInlineMode = true
        options.useFullScreenMode = true

        let sheet = SheetViewController(controller: nvc,
                                                  sizes: [.percent(0.5), .fullscreen],
                                                  options: options)

        sheet.animateIn(to: self.view, in: self)
gordontucker commented 3 years ago

You have to pick a view that is above the navigation controller if you want it to be above the navigation controller's view. The inline mode just adds it as a subview to whatever view you add it to.