Then i try to sent data from one view to another
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "varView" {
var viewController = segue.destinationViewController as ViewController
var indexPath = self.tableView.indexPathForSelectedRow()
viewController.varView = self.exams[indexPath.row]
}
}
I get an error at witch says that ViewController is a undeclared?
Rather than
prepareForSegue
you can directly callviewController
from storyboard and pass the datadeclare variable in the file you want to pass the data and
#import
the header file in which you want to pass the data.then navigate as follow...