Swift Call function from another ViewController

57 Views Asked by At

I am trying to call a function in the 'attendees' viewController from the viewContoller named 'swipePage':

Attendees:

func showMatchedScreen(){
    matchedView.isHidden = false
}

swipePage:

attendees().showMatchedScreen()

However I keep getting the following error on the line above:

fatal error: unexpectedly found nil while unwrapping an Optional value

Does anyone know why this is happening?

0

There are 0 best solutions below