I would like to open new View after clicking on a button. It works, when I make it by UIButton in Main.storyboard, however, I need to make it in code, because I have to use some if-statements with login/password. I tried to make it like it was suggested in other similar questions, but it doesn't work:
@IBAction func login(_ sender: UIButton) {
performSegue(withIdentifier: "Second", sender: self)}
Id of login-view: First;
Id of the second view: Second