一、利用Segue 方法
在performSegueWithIdetifier方法
override func prepareForSegue(segue: UIStoryboardSegue, sender:
AnyObject?) {
var theSegue = segue.destinationViewController as
SecondViewController
theSegue.text = "Pass"
}
二、 利用self.storyboard
var thirdVC =
self.storyboard?.instantiateViewControllerWithIdentifier("ThirdViewController") as ThirdViewController
thirdVC.text = "Pass"
self.navigationController?.pushViewController(thirdVC, animated: true)
网友评论