If you have more than one button in a vertical stackview, click the first button will also triggers the last button.
- Create a new single app project
- Click on story board
- Add a vertical stack view
- Add top, bottom, leading, trailing constraint for stackview to its parent.
- Set vertical stack view to fill equaily (This is an optional step)
- Add a button into the stack view
- Add another button into the stack view
- Add a third button into the stack view (This is also optional step)
- Run the app in the simulator.
- Click on the first button.
- Clone the repository
- Open StackViewBug.xcodeproj in Xcode (I use Xcode 11.3)
- Run app in the simulator
- Click on the first button
Expected behavior: Only the first button should be highlighted when pressed down on the first button.
Actual behavior: The first and third button all highlighted when pressed down on the first button only.
Here is a video screencast to show how to reproduce this issue from scrach Click here
If you put a view underneeth the stack view with at least 1 pt height, it will not have this highlight issue anymore.