Press two buttons at the same time if one of them closes the other

I want to do what tiltle says. The reason is that I can not delay the presentation of the button below, so I plan to put on another button on this button that you can configure yourself. And when I touch the top, an event will occur with the appearance.

+4
source share
1 answer

Say there are two UIButtons A and B.

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

[buttonObjectB sendActionsForControlEvents: UIControlEventTouchUpInside]; 

This will trigger the touch event of the second button as you wish.

+7
source

Source: https://habr.com/ru/post/1483903/


All Articles