I always initialise my view controllers from the storyboard like this:
let controller = storyboard!.instantiateViewController(withIdentifier: "MyViewController") as! MyViewController
I want to initialise variables on init. Usually I just assign them to the controller like controller.variable = x
. I'd prefer to use the init() function, but it seems I can't if I use the storyboard. What's the best way to do this?