Iām using left side menu from jonkykong/SideMenu this framework. Here i need to change background view colour alpha value while open(means click on button) the side menu and when i close the side menu i need back the original background colour. for that I have tried two methods:
Method 1):
func sidemenuOpenCloseColorChang(){
let menu = storyboard!.instantiateViewController(withIdentifier: "UISideMenuNavigationController") as! UISideMenuNavigationController
var set = SideMenuSettings()
set.statusBarEndAlpha = 0
set.presentationStyle = SideMenuPresentationStyle.menuSlideIn
set.presentationStyle.presentingEndAlpha = 0.5
set.menuWidth = min(view.frame.width, view.frame.height) * 0.90
//menu.sideMenuManager.addScreenEdgePanGesturesToPresent(toView: self.view)
menu.settings = set
//SideMenuManager.default.addScreenEdgePanGesturesToPresent(toView: view)
SideMenuManager.default.leftMenuNavigationController = menu
}
getting below error:
Use of unresolved identifier 'SideMenuSettings'
Use of unresolved identifier 'SideMenuPresentationStyle'
Value of type 'SideMenuManager' has no member 'leftMenuNavigationController'
Method 2): using UISideMenuNavigationControllerDelegate Metod
@IBAction func sideMenubtn(_ sender: Any) {
view?.backgroundColor = UIColor(white: 1, alpha: 0.9)
}
extension ProfileViewController : UISideMenuNavigationControllerDelegate {
private func sideMenuWillDisappear(menu: UISideMenuNavigationControllerDelegate, animated: Bool) {
//*do the color thing*
print("sidemenu disappear")
view?.backgroundColor = UIColor.white
}
Nothing worked for me, please help me in this code. Thanks in advance