One final step remains: back in the UIView class, create a new function that will call on the delegate to implement the segue. Remember, we just defined the UIView’s delegate as the UIViewController, so we’re basically calling on that link now.
In the viewDidLoad function, declare the UIView’s delegate to be the UIViewController. (Do this by calling on the UIView instance you just created and self.)
Back in the UIViewController, create an instance of the UIView so you can access its properties later on.