1

I am using the jonkykong SideMenu in a Swift 5 xcode project. The following code worked fine before 6.4.8.

import UIKit
import SideMenu

class SideMenuViewController: UITableViewController {

    @IBOutlet weak var headerView: UIView!
    @IBOutlet weak var driverNameLabel: UILabel!
    @IBOutlet weak var vehicleRegoLabel: UILabel!

    var menuItems = [Dictionary<String, String>]()

    override func viewDidLoad() {
        super.viewDidLoad()

        // Config options for the Slide in side menu
        SideMenuManager.default.leftMenuNavigationController?.presentationStyle = .menuSlideIn
        SideMenuManager.default.leftMenuNavigationController?.presentationStyle.onTopShadowOpacity = 1

        // hides the 1px bottom border on the nav bar so the header seemless merges to the navbar
        self.navigationController?.navigationBar.setValue(true, forKey: "hidesShadow")

        ... rest of controller code

After upgrading to 6.4.8 the presentationStyle has no effect. The presentationStyle is always the default of viewSlideOut regardless of what I set in the above code.

I am unable to find anything in the README about changes to this in the latest version. Any assistance would be greatly appreciated.

bludginozzie
  • 119
  • 2
  • 10

1 Answers1

1

Please set presentationStyle in SideMenuSettings and assign it to SideMenuNavigationController.

 func makeSettings() -> SideMenuSettings{
    var settings = SideMenuSettings()
    settings.allowPushOfSameClassTwice = false
    settings.presentationStyle = .menuSlideIn
    settings.statusBarEndAlpha = 0
    return settings
}

// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
       guard let sideMenuNavigationController = segue.destination as? SideMenuNavigationController else { return }
        sideMenuNavigationController.settings = makeSettings()
}
ajith Kumark
  • 333
  • 1
  • 3
  • 16