I've created a UIStackView
programmatically and inside placed UITextView
s.
when the number of the UITextView
s is more than 5 the boxes start overflowing off the screen. Here's a screenshot of the situation:
And here's the code :
let stackview = UIStackView(arrangedSubviews: letterBoxes)
stackview.axis = .horizontal
stackview.spacing = 10
stackview.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(stackview)
stackview.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
stackview.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
what am I missing? thank you