title: trigger viewDidAppear in extension or how to use variable from extension in viewController?
body: <p>Hi I want to put the viewDidAppear in my extension, but it cannot be triggered...</p>
  <p>see the code:</p>
  <pre><code>extension MyAutoWelcomViewController: VehicleMangerDelegate {
      
      
      func didUpdateRdwInfo(rdwData: RdwModel) {
          
      }
      
      func didUpdateVehicleInfo(vehicle: VehicleModel) {
          DispatchQueue.main.async {
              // code to pass data to a label
              print(vehicle.numberOfVehicles)
              
              let numberOfVehilce = vehicle.numberOfVehicles
              self.TestLabel.text = String(numberOfVehilce)
  
              func viewDidAppear(_ animated: Bool) {
                  
                  self.vehicleManager.delegate = self
                  
                  // check if vehicle list is nil
                  
                  self.vehicleManager.getVehicleData() // call api to get the user vehicle list
                  
                  if numberOfVehilce == 0 {
                      // show the welcome screen
                      print(&quot;vehicleList is nil&quot;)
                      
                  } else {
                      // use segue to navigate to the auto list screen
                      self.performSegue(withIdentifier: Constants.segueMyAutoWelcomeToAutoList, sender: self)
                      print(&quot;vehicleList is not nil&quot;)
                  }
                  
              }
              
              
          }
      }
  
      func didFailWithError(error: Error) {
          print(error)
      }
  
  }
  
  </code></pre>
  <p>The reason that I want to do this is because I have used a delegate (<code>VehicleMangerDelegate</code>) to pass some data from another screen to here, in the <code>didUpdateVehicleInfo()</code>function.</p>
  <p>Can you help me on this? I need to trigger the <strong>performSegue</strong> based on the data from an API call (i.e., <code>numberOfVehicle</code>), and the data is passed to this screen using a delegate.</p>