title: Multiple Image Pickers in one Controller
body: <p>I'm working on an onboarding flow for my app. I'm wanting to allow users to pick an avatar, display that avatar in an image view, and then select a background photo and display that in another image view. Currently, I have everything coded up, but for some reason when I present the picker controller, it defaults to controller for the avatar. I want the avatar button to only control the avatar button background image and the background button to only control the header image background image. Here's my code:</p>
  
  <pre><code> @IBAction func getBackground(sender: AnyObject) {
      let backgroundPickerController = UIImagePickerController()
      backgroundPickerController.delegate = self
      backgroundPickerController.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
      backgroundPickerController.allowsEditing = true
      self.presentViewController(backgroundPickerController, animated: true, completion: nil)
  }
  
  @IBAction func selectAvatar(sender: AnyObject) {
      let imagePickerController = UIImagePickerController()
      imagePickerController.delegate = self
      imagePickerController.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
      imagePickerController.allowsEditing = true
      self.presentViewController(imagePickerController, animated: true, completion: nil)
  }
  
  func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
      // set image for button
      let image = info[UIImagePickerControllerOriginalImage] as? UIImage
      self.addAvatar.setImage(image, forState: .Normal)
  
      // Dismiss controller
      self.dismissViewControllerAnimated(false, completion: nil)
  }
  
  func backgroundPickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
    // set image for button
      let image = info[UIImagePickerControllerOriginalImage] as? UIImage
      self.headerImage.image = image
       self.dismissViewControllerAnimated(false, completion: nil)  
  }
  </code></pre>