我有一个UIButton.我想使用相同的UIButton来执行多个操作.首先,我以编程方式将操作设置为按钮.
button1.addTarget(self,action: #selector(ViewController.function1),forControlEvents: .TouchUpInside)
button1.addTarget(self,action: #selector(ViewController.function2),forControlEvents: .TouchUpInside)
是否可以覆盖按钮的现有目标?