This SO answer展示了如何在Objective-C中传递多个UIControlEvent,但是你如何在Swift中做同样的事情?
以下尝试会产生错误:
upButton.addTarget(self, action: #selector(endVerticalButtonTouch), forControlEvents: .TouchUpInside | .TouchUpOutside)
upButton.addTarget(self, action: #selector(endVerticalButtonTouch), forControlEvents: (.TouchUpInside | .TouchUpOutside))
upButton.addTarget(self, action: #selector(endVerticalButtonTouch), forControlEvents: [.TouchUpInside | .TouchUpOutside])