I have a UITableView that populates Cells with data based on a JSON call. like so:
var items = [\"Loading...\"]
var indexValue = 0
// Here is SwiftyJSON co
I do it like this.
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let selectedName = nameArray[indexPath.row]
let newView: nextViewName = self.storyboard?.instantiateViewController(withIdentifier: "nextViewName") as! nextViewName
newView.label.text = selectedValue
self.present(newView, animated: true, completion: nil)
}