Need to initialize an object, but my initializer isn't cooperating. I've got this so far but I'm not sure how to pass parameters to my object initializer(s).
init(coder aDecoder: NSCoder, caseImage: UIImage, inputName: String, inputDate: String) {
self.caseImage = caseImage
self.caseName.text = inputName
self.caseDate.text = inputDate
super.init( coder: aDecoder )
}
required init(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
The initializer is being called by this code in another class:
func loadSampleData() {
let Photo1 = UIImage(named: "retino1")!
let case1 = TableCell(caseImage: Photo1, inputName: "John Smith", inputDate: "2015-10-18" ) //error
patientCaseArray = [case1]
}