I have 2 classes i.e. ViewController and BaseViewController
we have done with inheritance and i have question to pass event from Parent to child not child to parent.
class BaseViewController: UIViewController,UINavigationControllerDelegate,UIImagePickerControllerDelegate {
func openCamera() {
// open UIImagePickerController
}
// Delegates Methods of Image-picker controller
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]){
***My Question: //Pass Event to child class***
}
}
class ViewController: BaseViewController {
@IBAction func cameraButtonClicked(_sender: Any) {
self.openCamera()
}
}
THanks In advance.