If you want to go to another view controller from the Storyboard, just add StoryboardID to this view controller (like I have RootViewController with StoryboardID RootVC):

then create public property for the data you want to pass to the view controller (i.e. @property (nonatomic, strong) NSDictionary *propertyYouSet
).
And then add the following code in your -tableView:didSelectItemAtIndexPath:
UITableView delegate method:
YourViewController *yourViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier:@"YourViewControllerStoryboardID"];
yourViewController.propertyYouSet = @{ 'someKey': 'someValueYouWantToPass' };
[self.navigationController pushViewController:yourViewController animated:YES];
This way you can still use Storyboard view controllers without need of segue.
Swift version
Oops, just noticed the swift
tag. So here is the same code in Swift:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("yourViewControllerStoryboardID") as! UIViewController
vc.setYourProperty(someDictionaryHere) // I'm not so sure about this, I'm new in Swift too :)
self.presentViewController(vc, animated: true, completion: nil)
}
then override this method in your view controller:
init(coder aDecoder: NSCoder!)
{
super.init(coder: aDecoder)
}
(because in Swift -initWithCoder:
is required :) )