I have a UIView with a custom draw(_ rect: CGRect) method, which works.
However, when I place it inside a UIStackView, its draw method is not called. UILabel or UIImage inside the same stack view display normally.
In Interface Builder, it is drawn even inside the stack view, but when running on the device, it's not.