It’s because viewController storyboard is maybe nil at that time, try this
var myViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("myViewControllerIdentifier") as! ViewController
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…