I have an horizontal stack view that I added arranged sub views to it (7 cells). Each one of the cells in the stack has a circular badge that exceeds the view boundaries (ne
I was looking to prevent overlapping all together.
I tried the sendSubviewToBack method, but all that did was shift the overlap to the other side, unsurprisingly.
In my case, this was caused by an image view on my subview being set to scaleToFill which meant some of the image was actually overlapping the next view. My solution to this was, in my subview class (the view that was going into the stack view), was to simply enable mask to bounds
view.maskToBounds = true
This means that it just crops out anything that is hanging outside.