Представить определенный ViewController как подпредставление в MainviewController
var selectionVc : YourViewController!
func display()
{
view.perform(#selector(self.view.endEditing(_:)), with: nil, afterDelay: 000.2)
if selectionVc == nil
{
selectionVc = storyboard?.instantiateViewController(withIdentifier: "YourViewController") as! YourViewController
}
selectionVc.view.backgroundColor = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 0.4820205479)
selectionVc.superVc = self
// superVc your -- var superVc: mainViewController!
self.present(selectionVc, animated: false, completion: nil)
}