In my swift code below my goal is fetch the last image of the core data array. Right now my code is having a runtime error with indexpath. I dont know if you need to use a index path to do this. I have also added a screenshot that features all of the core data info.
var pic = UIImageView()
func loadImage(){
if let imageData = itemNamez[IndexPath.last(pic)] {
let coredataLoadedimage = UIImage(data: imageData)
pic.image = coredataLoadedimage
}
}