I had a requirement to add views from an array to a scrollview for my tutorial pages, in this case I built the VFL string by looping through the views, below is a snapshot, this code is to fit subview fully into scrollview’s page. With some tweaks, padding,etc can be added.
I did a sample and here is the link GitHubViewsFromArray