im basically trying to get the UI image to populate specific aircraft, heres what I have, but I can't seem to get the UI image to let me insert anything but the array:
`@IBAction func displayPressed(_ sender: Any) {
externalPicture.image = UIImage (named: externalArray [1])
seatingSetup.image = UIImage (named: seatingArray ["\(forPicture())" + "seating"])
}
func forPicture() -> String {
var aircraftFullName = ""
let manuf = aircraftType.selectedRow(inComponent: 0)
let model = aircraftType.selectedRow(inComponent: 1)
if manuf < aircraft.count {
aircraftFullName = aircraft[manuf]
if let aircraftModels = models[aircraftFullName] {
if model < aircraftModels.count {
aircraftFullName = aircraftFullName + " " + aircraftModels[model]
}
}
}
selectedAircraft.text = aircraftFullName
if aircraftFullName != "0" {}
return "\(aircraftFullName)"
}
let aircraft = ["Airbus", "Boeing", "Bombardier", "Embraer"]
var models = [ "Airbus": ["A300", "A320", "A330", "A340", "A350", "A380"], "Boeing": ["B737", "B747", "B757", "767", "777", "787"], "Bombardier": ["CRJ200", "CRJ700/900"], "Embraer": ["ERJ145", "ERJ170", "ERJ190"] ]
var externalArray = ["320outside", "747outside"]
var seatingArray = ["AirbusA320seating", "BoeingB747seating"]`