Need Help in applying constraints to UIScrollView
问题 I'm adding subviews programmatically. Requirement : when extra views are added the scroll should be enabled. The constraints that I applied : To remove extra spaces at the top I wrote self.automaticallyAdjustsScrollViewInsets = false also give content size as self.scrollView.contentSize = CGSize(width: self.contentView.frame.width, height: self.contentView.frame.height*2) But the when the view is loaded scroll is completely disabled. Please help me 回答1: When you using auto layout, you have to