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.
Swift 4 Update:
func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
let indexPath = IndexPath(row: 0, section: 0)
myTableView.selectRow(at: indexPath, animated: true, scrollPosition: .bottom)
}
Change row and section values if you want to select any other row in a different section.