我想使用newGameButton函数在buttonTapped函数内更改属性。例如:我想更改背景颜色,但不更改newGame按钮,我想更改与buttonTapped按钮连接的按钮的背景颜色。对不起我的英语
base col2 col3
111 sd dsf
111 fs cx
222 xcv bc
222 gfd xcb
222 xcv cxb
答案 0 :(得分:0)
如果要使用“ newGameButton”更改“ buttonTapped”的属性,只需为“ buttonTapped”创建一个出口。您可以使用此出口访问“ buttonTapped”的属性。
ComboBoxItem
答案 1 :(得分:0)
假设newGameButton不是您可以做的git push --mirror --all bm
数组的一部分
buttons
在开始新游戏时
@IBAction func buttonTapped(_ sender: UIButton) {
if (buttons.contains(sender) {
sender.backgroundColor = UIColor.getrandomColor()
sender.tintColor = UIColor.white
sender.isEnabled = false
}
}