how to add mathwidget as a subview inside another UIViewController Currently, mathwidget is working fine when loading UIViewController. let subViewEE = MathWidgetClassName() self.present(subViewEE, animated: true, completion: nil)
But when I am trying to add it as a subview inside present view controller nothing shows up, here is the code:
let mathWidget= MathWidgetClassName()
self.addChildViewController(mathWidget)
self.view.addSubview(mathWidget.view)
mathWidget.didMove(toParentViewController: self)
Can anyone help to display MathWidget as a subview in present UIViewController?
MathWidgetClassName
is sub class ofUIVIewController
? – Ketan Parmar