How would I go about inserting a UIViewController inside a UICollectionView Cell?
You will need to make a custom container view controller: https://developer.apple.com/library/content/featuredarticles/ViewControllerPGforiPhoneOS/ImplementingaContainerViewController.html
func display(contentController content: UIViewController, on view: UIView) {
self.addChildViewController(content)
content.view.frame = view.bounds
view.addSubview(content.view)
content.didMove(toParentViewController: self)
}
For each cell in your container, you will have to call something like the above function with the correct child view controller on the cell's content view.
Be careful not to try to add multiple view controllers onto the same cell and make sure they get removed properly as well.
This idea is complex enough that it isn't conducive to a simple stack overflow answer but hopefully the above will be enough to get you started.