Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在查看此处的其他教程,以了解如何使按钮无法按下。但是,我不断收到此错误:
'(UIButton) -> ()' 类型的值没有成员 'isEnabled'
代码是:
@IBAction func PlayButton(_ sender: UIButton) { PlayButton.isEnabled = false }
你这样做:
sender.isEnabled = false
另请注意,您的@IBAction函数与按钮具有相同的名称。这会导致名称歧义。将函数的名称更改为其他名称。
@IBAction