jonkykong / SideMenu

Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.
MIT License
5.65k stars 690 forks source link

iOS 11: Status bar of the transitioned view is white when using menuAnimationTransformScaleFactor #258

Open frenkelor opened 7 years ago

frenkelor commented 7 years ago

New Issue Checklist

I have read the guidelines for contributing and I understand:

Issue Description

Status bar of the transitioned view is white see the image below after clicking on the transitioned view the status bar place take over by the view

The issue is reproduced on Xcode 9 GM iPhone 7,8,10 simulator

screen shot 2017-09-13 at 22 23 00

MHamayun commented 4 years ago

This problem is occurs with me my problem is solved by this way: I make a function according this sideMen like have its size or colour so when I call at viewdidload problem is solved but when I don't call so problem is still

Khislatjon commented 4 years ago

Hello guys! Where should I add this code: SideMenuManager.default.menuAnimationBackgroundColor = UIColor.clear to prevent status bar being in a black color.

sijjeel commented 4 years ago

@jonkykong Hi Guys, I am having the same issue, Please let me know if anyone found a solution for this. Thanks

JaisinghSisodia commented 4 years ago

SideMenuManager.default.menuAnimationBackgroundColor = UIColor.clear or SideMenuManager.default.menuAnimationBackgroundColor = UIColor(patternImage: UIImage(named: "help")!) not work !

ekran resmi 2018-11-17 00 54 25

@jonkykong

did anyone got any solution for it

Farazahmed90 commented 3 years ago

Hello, I am pushing view controller on didselect in sidemenu controller but it will push viewcontroller in the sidemenu not in the root controller movie.zip

Slaine066 commented 3 years ago

@frenkelor best I can tell, this is a regression or change in functionality in iOS 11 that I cannot easily account for. Whenever a navigation bar is not aligned with the window's top, the height is automatically reduced because it's assumed it does not need to allow space for the status bar.

A work around is to snapshot the main view controller and overlay the snapshot. I have not added this to the library as it would break existing functionality promises (menuPresentingViewControllerUserInteractionEnabled as well as screen rotation ugliness).

Example work-around, placed inside of your UISideMenuNavigationController subclass:

    private weak var screenshot: UIView?

    open override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        if let screenshot = presentingViewController?.view.snapshotView(afterScreenUpdates: false) {
            presentingViewController?.view.addSubview(screenshot)
            self.screenshot = screenshot
        }
    }

    override open func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)

        screenshot?.removeFromSuperview()
    }

@jonkykong Thank you for the snippet. If landscape mode is not needed it's a good workaround!