RubberDucky4444 RubberDucky4444 - 6 months ago 25
iOS Question

UIStackViews are overlapping and therefore the button doesn't work

I have two

UIStackView
s and they animate so when it is supposed to be tapped the overlapping shouldn't exist or be a problem anymore, but it still is.

Is there a way to still accept touches on a control that's covered by another control? enter image description here

This is how it looks without running it...when it loads..the square stackview in the middle stays put and the other one which is still behind it...grows adn the buttosn aren't covered anymore

Answer

You can set userInteractionEnabled to false on the covering views

Or if you want both to receive events, set exclusiveTouch to false, and userInteractionEnabled to true.