I am trying to connect the 2 view controllers with prepare for segue. When I am writing the code in it, it does not want to prompt me the destination VC. In my other view controller, it was appearing it.
here is the code for segue
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "catView" {
if let indexPath = self.tableView.indexPathForSelectedRow {
let value = subs[indexPath.row]
print("value = \(value)")
let controller = segue.destinationViewController as! Business_ViewController
controller.cate_Id = value["id"] as! String
controller.catTitleRec = value["NAME"] as! String
}
}
}
Just to show the error on the code, so adding this screenshot
I am uploading one more image to show the structure of all my file. And as u can see the error on 2 line, i have written Business_ViewController, the error show Type'SubCategories' has no subscript member