title: How to reload the data from UI picker view and close the Picker view with transition
body: <pre><code>class MainVC: UIViewController {
  
      var datasourceForUsers :UserPicker!
      var userPicker :UIPickerView!
      var toolBar: UIToolbar!
      override func viewDidLoad() {
  
   super.viewDidLoad()
  
          userPicker = UIPickerView()
          toolBar = UIToolbar()
          datasourceForUsers = UserPicker()
   }
  
      @IBAction func onMoreTapped(){
  
          NotificationCenter.default.post(name: NSNotification.Name("ToggleSideMenu"), object: nil)
      }
  
      @IBAction func showRegisteredUsers(_ sender: Any) {
  
          createUserPicker()
          configureToolBar(toolBar)
      }
  
  
      func createUserPicker() {
  
          userPicker.dataSource = datasourceForUsers
          userPicker.delegate = datasourceForUsers
          //Customizations
          userPicker.backgroundColor = .black
          userPicker.frame = CGRect.init(x: 0.0, y: UIScreen.main.bounds.size.height - 300, width: UIScreen.main.bounds.size.width, height: 300)
          self.view.addSubview(userPicker)
      }
  
      func configureToolBar(_ toolBar:UIToolbar  ){
  
          toolBar.sizeToFit()
  
          toolBar.barTintColor = .black
          toolBar.tintColor = .white
  
          let doneButton = UIBarButtonItem(title: "Done", style: .plain, target: self, action: #selector(MainVC.dismissKeyboard))
          toolBar.setItems([doneButton], animated: false)
          toolBar.isUserInteractionEnabled = true
          toolBar.frame = CGRect.init(x: 0.0, y: UIScreen.main.bounds.size.height - 300, width: UIScreen.main.bounds.size.width, height: 50)
          self.view.addSubview(toolBar)
  
  
      }
  
      override func viewWillAppear(_ animated: Bool) {
          userPicker.reloadAllComponents()
          toolBar.reloadInputViews()
      }
  
  
      @objc func cancelDatePicker(){
          self.view.endEditing(true)
          }
  
          @objc func dismissKeyboard() {
             self.resignFirstResponder()
  
          }
   }
  </code></pre>
  
  <p>I used above code to show some data on <code>UIPickerView</code> .It works fine.But When I change the datasource(Add new Data) where the data  is stored it does not reflect  on the UI picker.In order to do that I have to run the application again.Second thing is I couldn't close the UI picker with transition.</p>