I have authorization window. When app is starting it is okey. I tap sign in and go to the next window. But when I tap sign out and want to back at authorization window - I get nil. In the method signinView controller is nil.

I have authorization window. When app is starting it is okey. I tap sign in and go to the next window. But when I tap sign out and want to back at authorization window - I get nil. In the method signinView controller is nil.

you need to take instance from Storyboard.
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewControllerWithIdentifier(“MyController”)
In this way you will get your controller instance.
Make sure you already set storyboard ID for this controller.
Just replace below code in function's second line and hope it will solved your problem.
let storyboard = UIStoryboard(name: "Main", bundle: nil)//Make it global
let controller = storyboard!.instantiateViewControllerWithIdentifier("your identifer")