1
var sb = UIStoryboard(name: “Main”,bundle:nil)
var vc = sb.instantiateViewControllerWithIdentifier(“ChooseViewController”) as ChooseViewController
self.presentViewController(vc,animated:true,completion:nil)
2
var vc = AnswerViewController()
self.presentViewController(vc,animated: true,completion: nil)
3
self.dismissViewControllerAnimated(true,completion:nil)
4 add Segue in storyboard
override func prepareForSegue(segue: UIStoryboardSegue!,sender: AnyObject!) {
var channelC:ChannelController=segue.destinationViewController as ChannelController
channelC.delegate=self
channelC.channelData=self.channelData
}
5
var webView=WebViewController()
webView.detailID=data.newsID
//取导航控制器,添加subView
self.navigationController.pushViewController(webView,animated:true)
6
func popViewControllerAnimated() -> UIViewController! 弹出最上面的视图,并返回下一个视图控制器
7.通过func popToViewController(animated:) -> AnyObject[]!返回到navigationController视图堆栈中指定的某一个视图