itenyh
itenyh

Reputation: 1939

Click on two buttons at the same time, if one covers the other one

What I want to do is just as the tiltle says. The reason is , I am not able to custome the view of the below button, so I plan to put another button on this button which can be customed by myself. And when I touch the upper one, the event of the belown one will be triggered.

Upvotes: 4

Views: 428

Answers (1)

Jay Patel
Jay Patel

Reputation: 647

Let's say there are two UIButtons A & B.

In the touch event (touchupinside) of A add the following code:

[buttonObjectB sendActionsForControlEvents: UIControlEventTouchUpInside];

This will trigger second button's touch event as you desire.

Upvotes: 8

Related Questions