Q: swift 4 pickerview with images I am trying to get images to show up in the pickerview instead of text.
I am seeing ? and no images. I know the images are correct as I am using them in another view. 
I tried to follow some other stack overflow posts but to no avail.
like this one: How can I get images to appear in UI PickerView Component in Swift?

code:
import UIKit

class ShuffleViewController: UIViewController, UIPickerViewDelegate, UIPickerViewDataSource {

@IBOutlet weak var label: UILabel!

@IBOutlet weak var shufflePicker: UIPickerView!
var pickerData: [String] = [String]()

let images = [UIImage(named:"Acceptance"),
              UIImage(named: "loveimage"),
              UIImage(named: "gratimage"),
              UIImage(named: "successsmall"),
              UIImage(named: "pos"),
              UIImage(named: "rel"),
              UIImage(named: "weal"),
              UIImage(named: "heal2"),
              UIImage(named: "confiden")]

override func viewDidLoad() {
    super.viewDidLoad()

    shufflePicker.delegate = self
    shufflePicker.dataSource = self

}

func numberOfComponents(in shufflePicker: UIPickerView) -> Int {
    return 1
}


func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {

}


func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return 6
}


func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> UIImage? {

return images[row]
}

I'm no sure what to do as I am fairly new to Xcode and swift

A: Just you can use this Method 
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {


        let myImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 220, height: 61))


        myImageView.image = pickerDataSource[row]


        return myImageView

    }

