I am trying to take a single entity from an array of NSManagedObjects
var journals = [NSManagedObject]()
let indexPath = tableView.indexPath(for: (sender as! UITableViewCell))
controller.journalToDisplay = journals[indexPath!.row]
var journalToDisplay: Journal?
Cannot assign value of type 'NSManagedObject' to type 'Journal?'
var journalToDisplay: NSManagedObject as! Journal
Arrays do not implicitly know the types of the objects contained within them, so the compiler can't assign custom classes without explicitly casting the object you get from indexing the array.
Cast journals[indexPath!.row] to a Journal object so the compiler knows to treat it as such.