@IBOutlet var buttons: [UIButton]!
@IBOutlet var labels: [UILabel]!
@IBAction func cevapSeçildi(_ sender: UIButton) {
if sender == buttons[0] {
`enter code here`
labels[0].backgroundColor = UIColor.yellow
}
}
我要这个 ..
var x : Int
if sender == buttons[x] { labels[x].backgroundColor = UIColor.yellow }
你能帮我吗