I'm using the presentViewController:animated:completion:
method to go to another view controller.
This is my code:
AddTaskViewController *add = [[AddTaskViewController alloc] init];
[self presentViewController:add animated:YES completion:nil];
This code goes to the other UIViewController
but the other controller is empty. I've always been using storyboards but now I need this to be done in code.
You need to set storyboard Id from storyboard identity inspector
The best way is
your code :
this code can goes to the other controller , but you get a new viewController , not the controller of your storyboard, you can do like this :