I have a tableviewcell which has two button inside stackview. One of the button name is topupButton and the other one is details button. Topupbutton hidden if one flag is true. You can find below the code.
self.topupButton.isHidden = self.selectedSim.operator_?.is_prepaid ?? false
When I hide the topup button details button should stretch in stackview. But in one of my cell, it's not in correct size. When I do visual debug I saw that the frame of button is correct but background is not stretch through the button. You can see the image's below.
I've tried layoutsubviews, setneedsdisplay, layoutifneeded for cell, stackview and buttons. Nothing changed. You can also find my stackview config below.