I am having trouble understanding how to embed my view into a scroll view with a dynamic height. I have managed to create scroll views before, but only with a static height. How would an iPhone application, such as Facebook or Instagram, for example, manage to create a scroll view for an entire feed of dynamic-height data. To this point I have used storyboards to create the scroll views, but I am assuming that this done in code would be much better.
class connectDetailsViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
//set up variables with data
fillData()
}
override func viewWillAppear(animated: Bool) {
let nameTitleString = String(businesses[businessNum]["name"]!)
nameTitle.text = nameTitleString
processTimes() // Adds information for the hours of operation, if applicable
processDetails() //Adds information for the details if possible (a few sentences to a few paragraphs)
}
}
processDetails() and ProcessTimes() will edit the content in a stack view, how can I create a scroll view to encompass both of these stack views at the correct height?