Get the frame of a UIStackView subViews
问题 I have created a UIStackView in IB which has the distribution set to Fill Equally. I am looking to get the frame for each subView but the following code always returns (0, 0, 0, 0). class ViewController: UIViewController { @IBOutlet weak var stackView: UIStackView! override func viewDidLoad() { super.viewDidLoad() let pView = UIView() let sView = UIView() pView.backgroundColor = UIColor.red sView.backgroundColor = UIColor.orange stackView.addArrangedSubview(pView) stackView.addArrangedSubview