Finding the size of a view adjusted by a UIStackView swift
The sizes are available after UIStackView.layoutSubviews()
finishes. You can subclass UIStackView
and override layoutSubviews
:
class MyStackView: UIStackView {
override func layoutSubviews() {
super.layoutSubviews()
print("arrangedSubviews now have correct frames")
// Post a notification...
// Call a method on an outlet...
// etc.
}
}