On my view controller on the left, ModuleDetailsVC, I have a class property called moduleId. My problem is that I want to pass this property to ChartVC, in order to generate the corresponding graphic. I have a container view because I need a different view controller for my chart view.
class ModuleDetailsVC: UIViewController {
@IBOutlet weak var chartSubView: UIView!
private var _module: Module?
[...]
}
class ChartVC: UIViewController {
var moduleId: Int!
func setModuleId(moduleId: Int) {
self.moduleId = moduleId
}
[...]
}
Where to call ChartVC.setModuleId()? If calling this is the right solution... (I already tried ViewDidLoad/Appear / SubViewLayout... etc
PS: Title may be totally wrong, if you have any idea for it, just edit.