Hi All,
If you want to present UIViewController in swift from storyboard . For example :-
FirstViewController.swift is a viewcontroller in your Storyboard with storyboard Identifier FirstViewController then to present this viewcontroller use this code.
let captureViewCon:UIViewController = (self.storyboard?.instantiateViewControllerWithIdentifier("FirstViewController"))!
self.presentViewController(captureViewCon, animated: true, completion: nil)
Present UIViewController in swift using XIB.
For example :- secondViewController.swift is a viewcontroller in your Project with XIB secondViewController.xib then to present this viewcontroller use this code.
let captureViewCon = secondViewController(nibName: "secondViewController", bundle: nil)
self.presentViewController(captureViewCon, animated: true, completion: nil)
0 Comment(s)