Alright, so I have these image views that I move around using a good amount of code (this being my reason for not wanting to rework my whole script moving a UIButton that the image view is a subview of - it will screw up everything).
They are little circles here:
bubble1.frame = CGRectMake(0, 0, screenSize.width*(21/330), screenSize.width*(21/330))
bubble1.center = CGPointMake(lineView.bounds.width * 0.2, lineView.bounds.height * 0.98) //change when make smaller
bubble1.layer.cornerRadius = bubble1.bounds.width * 0.5
bubble1.backgroundColor = colorWithHexString(chosenColor)
bubble1.userInteractionEnabled = false
//bubble1.alpha = 0.0
let bubbleBtn1 = UITapGestureRecognizer(target:self, action:#selector(HistoryViewController.bubble1Tap(_:)))
bubble1.addGestureRecognizer(bubbleBtn1)
As you can see they have tapgesturerecognizers attached to them so when they are touched something is triggered.
This works well except because the circles are so small (they need to be that small) it is hard to trigger the touch - I have looked around for ways to expand the area of the recognizer to no avail.
I then tried to add a larger 70x70 button as a subview to my image view, and i know the larger button was added because I saw it as a larger square on top of my circle, except for some reason it only triggered its action WHERE the underlying bubble1
was, rendering the button useless.
How can I make the larger button trigger its action where the smaller image view is NOT? Ive looked at Qs like How to increase selection area of UIButton? but this is more geared to the issue tat my button does not work outside its superview's area.
How can I solve this?