I've seen a lot of examples of creating buttons programmatically in ViewController class and in storyboards (using @IBAction after that).

Is there a way to create a custom class for a button and to make it toggle my side menu without rewriting this action in every single ViewController.

Now I create this button on each VC I need in storyboard and copy-paste this code:

```
@IBAction func openMenuClick() {
    sideMenuController?.toggle()
}

```

How can I avoid this code duplication?