I have an application that is viewbased and I am adding a tableview as a subview to the main view. I have taken UITableViewDelegate to respond the table methods.
UITableViewDelegate
Here's how to do this in Swift 1.2:
override func viewWillAppear(animated: Bool) { let firstIndexPath = NSIndexPath(forRow: 0, inSection: 0) self.tableView.selectRowAtIndexPath(firstIndexPath, animated: true, scrollPosition: .Top) }