I am trying to build a sign up page with the option to use phone or email. In order to be able to send it to the server all of my views have to be in one view controller. So I am trying to figure out how I can move one view to the front of the controller when pressing a button.
Screenshot 1:

Screenshot 2:

This is because you are trying to call it on the class
SignUpView, rather than an instance of the class.bringSubview(toFront:)is an instance method.It looks like you have changed the type of the view controller's
viewproperty to be SignUpView, but you can still access it by usingview, like this:Note that I have also changed your use of
EmailViewin your method call. You need to be using the property names you have assigned the instances of the views, not their class names.