I am a newb to coding.
I had no issues with creating a segue prior to the Swift 1.2 update. I am getting the error of Cannot assign a value of type 'PFObject' to a value of type 'PFObject?'
when I try the code below.
Can anyone help me figure this out ?
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "PushToDetails" {
// Get the new view controller using [segue destinationViewController].
var detailScene = segue.destinationViewController as! DetailViewController
// Pass the selected object to the destination view controller.
if let indexPath = self.tableView.indexPathForSelectedRow() {
let row = Int(indexPath.row)
detailScene.currentObject = objects[row] as! PFObject
}
}
}