How to make UIStackView scroll with UIScrollView programmatically?
问题 I have seen several solutions to make UIStackView scroll with UIScrollView but they all rely Autolayout and IB. Is there a way to do it programmatically? I have seen this example: https://gist.github.com/twostraws/a02d4cc09fc7bc16859c But it uses Visual Format Language and I am using the Layout Anchor API. The layout anchor API: view.leadingAnchor.constraintEqualToAnchor(otherview.topAnchor).active = true 回答1: You can try ScrollableStackView : https://github.com/gurhub/ScrollableStackView