What I want to achieve:
User presses the button in the ViewController then, the color of the button placed in the container view should change its color to red.
Swift 3 for macOS:
// MARK: - Container View Controller
var containerViewController: ContainerViewController?
let containerSegueIdentifier = "Container Segue"
override func prepare(for segue: NSStoryboardSegue, sender: Any?) {
if segue.identifier == containerSegueIdentifier {
if let connectContainerViewController = segue.destinationController as? FormationViewController {
formationViewController = connectContainerViewController
}
}
}
Check identifier and controller class.