I create a UIButton programmatically using the following code:
myButton = [UIButton new];
[myButton setImage:[UIImage imageNamed:@"myButtonNormal"]
forState:UIControlStateNormal];
[myButton setBackgroundImage:[UIImage imageNamed:@"myButtonBackgroundNormal"]
forState:UIControlStateNormal];
myButton.alpha = MY_BUTTON_ALPHA;
[myButton addTarget:self
action:@selector(myButtonSelector:)
forControlEvents:UIControlEventTouchUpInside];
[self.parentViewController.view insertSubview:myButton
atIndex:10];
Now the problem is with the backlight of the button when it is pressed. It works well, i.e. The color of the button changes when pressed, except when I click on the very border of the left side of the button. To illustrate this:

When the green part of the button is pressed, everything is in order, and the button is highlighted. When the red part is pressed, the button for selecting the button is called, that is, the button works, but the backlight does not work.
I tested this on a simulator to be able to make more accurate clicks.
, , . , , , , UIGestureRecognizerDelegate.
, ?