When I try to instantiateViewController in another storyboard that is in a navigation controller the view cannot be presented and I get this error. What am I doing wrong here? Seems like there is something I'm missing here.
Application tried to present modally a view controller <CategoryViewController: 0x10c819890> that has a parent view controller <Pulley.PulleyViewController: 0x10d832a00>.
private func toEditViewController() {
let storyboard = UIStoryboard(name: "Recycling", bundle: nil)
let navVC = storyboard.instantiateViewController(withIdentifier: "requestnavcontroller") as! RequestNavigationController
let pulley = navVC.viewControllers[0] as! PulleyViewController
pulley.loadViewIfNeeded()
let vc = pulley.primaryContentViewController as! CategoryViewController
vc.isFromEditing = true
present(vc, animated: true)
}
When I try to instantiateViewController in another storyboard that is in a navigation controller the view cannot be presented and I get this error. What am I doing wrong here? Seems like there is something I'm missing here.