I have my view in the following way.
I am expanding the text view programmatically depending on the text as follows
func textViewDidChange(_ textView: UITextView) {
let size = CGSize(width: titleAndDescriptionContainerView.frame.width, height: .infinity)
let estimatedSize = noteDescription.sizeThatFits(size)
noteDescription.constraints.forEach{
(constraint) in if constraint.firstAttribute == .height{
constraint.constant = estimatedSize.height
}
}
titleAndDescriptionContainerView.constraints.forEach{
(constraint) in if constraint.firstAttribute == .height{
constraint.constant = estimatedSize.height + noteTitle.frame.height
}
}
entireScrollView.contentSize = CGSize(width: entireScrollView.frame.width, height: (imageScrollView.frame.height + titleAndDescriptionContainerView.frame.height + audioContainerView.frame.height))
}
I am also changing the size of the entire scroll view. But I am not able to scroll my view when the text is long. have a look at these screenshots.



Your constraints are not correctly defined. You need to redefine them as follows:
Make sure your EntireScrollView is pinned to the edges of the root view.
Pin to the EntireScrollView Content Layout Guide the following:
ImageScrollView, Audio Container View, and Title And Description Container View need to be of equal width with the EntireScrollView Frame Layout Guide.