Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 887
itenyh Avatar asked Mar 23 '23 18:03

itenyh


1 Answers

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.

like image 170
Jay Patel Avatar answered Apr 06 '23 23:04

Jay Patel