I\'m new to iOS development, so go easy on me please :)
Using Xcode 4.2 for iOS 5, I\'ve built a view controller in IB, with a tableview inside it linked to a detail
SWIFT 2 UPDATE
I "hooked up" the tableView as an outlet from the storyboard in the ViewController.
like this: @IBOutlet weak var tableView: UITableView!
Just drag your tableView into the ViewController and make it an outlet. Then you can reference its properties such as self.tableView.reloadData().
This property as well as others that referenced the tableView were giving me errors until I added the tableView as a referencing outlet.
Add this to your class:
class TableViewController: UIViewController, UITableViewDataSource, UITableViewDelegate
The indexPath.row should now work, as well as the segues. You can also use instantiateViewControllerWithIdentifier like this:
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let myOtherView = self.storyboard!.instantiateViewControllerWithIdentifier("otherViewController") as! otherViewViewController
myOtherView.url = NSURL(string:"\(array[indexPath.row])")
self.presentViewController(myOtherView, animated: true, completion: nil)
}
Hope that helps.