Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to show left menu button on each screen ? #170

Open
Shahbaz-Akram opened this issue Oct 9, 2017 · 1 comment
Open

Is it possible to show left menu button on each screen ? #170

Shahbaz-Akram opened this issue Oct 9, 2017 · 1 comment

Comments

@Shahbaz-Akram
Copy link

No description provided.

@omerCoosto
Copy link

omerCoosto commented Jan 18, 2018

A way of doing it:
On your UIViewController class inherit this "CustomMenuItemViewController" class to have the left menu button

class CustomMenuItemViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        setupMenuButton()
    }
    
    func setupMenuButton() {
        let menuButton = UIBarButtonItem(image: #imageLiteral(resourceName: "menu"), style: .plain, target: self, action: #selector(showMenuAction(_:)))
        navigationItem.leftBarButtonItem = menuButton
    }
    
    @IBAction func showMenuAction(_ sender: Any) {
        toggleSideMenuView()
    }
}

(this question has been here for a while but maybe for other that can be helpful)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants