This question might be asked already about hiding buttons, but I was wondering if I could just click a button which would affect the variables in another view controller. For example, I have firstViewController and endViewController. There's a button in endViewController that the user presses which should change a variable in the firstViewController. Is there a way to access the endViewController button from the firstViewController?

**Edit**

I haven't tried much so far except control clicking the endViewController button into the firstViewController (which didn't work).

```
class firstViewController: UIViewController {
    @IBAction func nextButton(_ sender: Any) { //button that sits in endViewController

    }
}

```