handsomecode / InteractiveSideMenu

iOS Interactive Side Menu written in Swift.
Apache License 2.0
708 stars 163 forks source link

iOS 13 support #112

Closed yberdnikov closed 4 years ago

yberdnikov commented 5 years ago

Right now when you select new controller, it shows black screen. Same code works on iOS 12 and earlier versions.

ghost commented 5 years ago

Same here. I also tried the forked repos that support swift 5.0 but same result.

kiwiswift commented 5 years ago

Try setting the modalPresentationStyle of menu viewController to fullScreen as below. It should solve the problem.


    override func viewDidLoad() {
        super.viewDidLoad()

        let screenSize: CGRect = UIScreen.main.bounds
        self.transitionOptions = TransitionOptions(duration: 0.4, visibleContentWidth: screenSize.width / 6)

        // Instantiate menu view controller by identifier
        self.menuViewController = SampleMenuViewController.storyboardViewController()
        self.menuViewController.modalPresentationStyle = .fullScreen

        // Gather content items controllers
        self.contentViewControllers = contentControllers()

        // Select initial content controller. It's needed even if the first view controller should be selected.
        self.selectContentViewController(contentViewControllers.first!)

        self.currentItemOptions.cornerRadius = 10.0
    }
`
kanagudurai commented 5 years ago

Try setting the modalPresentationStyle of menu viewController to fullScreen as below. It should solve the problem.

    override func viewDidLoad() {
        super.viewDidLoad()

        let screenSize: CGRect = UIScreen.main.bounds
        self.transitionOptions = TransitionOptions(duration: 0.4, visibleContentWidth: screenSize.width / 6)

        // Instantiate menu view controller by identifier
        self.menuViewController = SampleMenuViewController.storyboardViewController()
        self.menuViewController.modalPresentationStyle = .fullScreen

        // Gather content items controllers
        self.contentViewControllers = contentControllers()

        // Select initial content controller. It's needed even if the first view controller should be selected.
        self.selectContentViewController(contentViewControllers.first!)

        self.currentItemOptions.cornerRadius = 10.0
    }
`

Solved my problem. Thank you so much

Kaustubh2018 commented 5 years ago

Awsome Support By you guys.. Thank you guys

ghost commented 5 years ago

Try setting the modalPresentationStyle of menu viewController to fullScreen as below. It should solve the problem.

    override func viewDidLoad() {
        super.viewDidLoad()

        let screenSize: CGRect = UIScreen.main.bounds
        self.transitionOptions = TransitionOptions(duration: 0.4, visibleContentWidth: screenSize.width / 6)

        // Instantiate menu view controller by identifier
        self.menuViewController = SampleMenuViewController.storyboardViewController()
        self.menuViewController.modalPresentationStyle = .fullScreen

        // Gather content items controllers
        self.contentViewControllers = contentControllers()

        // Select initial content controller. It's needed even if the first view controller should be selected.
        self.selectContentViewController(contentViewControllers.first!)

        self.currentItemOptions.cornerRadius = 10.0
    }
`

did u use the latest repo?

fatihkan commented 5 years ago

Thank you. If you change this code only need this code line self.menuViewController.modalPresentationStyle = .fullScreen

numanayhan commented 5 years ago

Thanks bro .fullScreen is fixed this isuues

doitwithdk commented 5 years ago

Perfect fix. @handsomecode pls accept the PR