How can i switch one UIViewcontroller to another UIViewController in Swift language? I 'm create a new empty project and and set UINavigationcontroller and not using story board.
For example we use this code in objective c for pushing view controller
MyViewController *controller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
[self.navigationController pushViewController:controller animated:YES]
What is the alternative in Swift ?
Any help can be appreciated Thanks in advance.