I had the same problem and it was resolved.
In my case, there are two adjacent buttons. (The left button is button A. The right button is button B.) ButtonA is not called a touch down event. But ButtonB is called a touch down event.
I tried to override pointInside in ButtonB class.
override func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool { println(point) }
Then I pressed button A and named pointInside ButtonB !! point.x is a negative value.
So, I checked the point and sendAction in the ButtonB class.
override func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool { if CGRectContainsPoint(self.bounds, point) { return true } // hoge.left means hoge.frame.origin.x if point.x < 0, let buttonA = optionalButtonA { buttonA.bounds.origin.x -= (self.left - buttonA.left) //self.left is buttonB.left if CGRectContainsPoint(buttonA.bounds, point) { buttonA.sendActionsForControlEvents(UIControlEvents.TouchDown) return false } } return false }
sagaraya
source share