How can I get images to appear in UI PickerView Component in Swift?
问题 I am trying to use images in a Swift PickerView. I don't know how to get the images to actually appear in the component. I know how to do this using Strings with the titleForRow function but I don't know how to do this using images. Here is my code so far: import UIKit class ViewController: UIViewController, UIPickerViewDelegate { @IBOutlet weak var pickerView: UIPickerView! var imageArray: [UIImage] = [UIImage(named: "washington.jpg")!, UIImage(named: "berlin.jpg")!, UIImage(named: "beijing