I have a scroll view nested inside a view controller that resides in a container. The view controller that uses the specified class called ScrollingViewController is as follows:
class ScrollingViewController: UIViewController { @IBOutlet weak var scrollView: UIScrollView!
Basically, what happens is that two view controllers that use this class SubProfileOneViewController and SubProfileTwoViewController , respectively, are created as subOne and subTwo . They are then added to the scroll list as children, to create an interface in which the user can scroll directly to access another view (almost like Snapchat). subOne and subTwo should be next to each other, and the user should be able to switch from one to the other and vice versa.
Here's what it all looks like on my storyboard: 
SubProfileOneViewController and SubProfileTwoViewController each have a view (represented by green and red, respectively), and each of them has the same exact limitations as: Height = 262, Trailing space to superview = 0, Leading space to superview = 0, Top space for the supervisor = 0
Ideally, when starting up, there should be two views, one green and one red, and the user should be able to scroll between them. However, here's what actually happens: 
Green and red views do not occupy the entire width of the screen and instead condense into a small ribbon on the left, and most view controllers are white, not their corresponding color. I have tried many things and I am not sure what I am doing wrong.
(credit for the code in ScollingViewController goes to lbrendanl on github, linked here: https://github.com/lbrendanl/SwiftSwipeView )