I noticed in the setCard method of the matchApp tutorial (day 25 of the iOS 28 day challenge, card flipping logic) Xcode forced me to unwrap the card object before I could access the imageName property to assign it to the frontImageView.image property. The app functions fine with the unwrapping, but flags this as an error if I don’t. See line of code below for the image assignment. I used a different name for the function parameter to remove any ambiguity. I didn’t see this pop up as an issue in Chris’s code during the video. Any idea why that would flag as needing to be unwrapped?
func setCard( _ cardPassed:Card){
self .card = cardPassed
frontImageView.image = UIImage(named: card!.imageName)