UIImagePickerController: didFinishPickingMediaWithInfo not being called
<p>Hope you're all doing well. Wondered if anyone could help me understand why Xcode fails to play nice with me....</p>

<p>I have broken the code into sections below in order to allow me to select a profile photo from UIImagePicker:</p>

<ol>
<li>WORKS: Assigning the delegate class for both ImagePicker &amp; NavigationController</li>
<li>WORKS: Instantiating the UIImagePicker variable</li>
<li>WORKS: Load ImagePickerViewController and enable to select an image</li>
<li>FAILS: Added additional functions for closing and finishing picking with a UIImagePicker but neither ever get called? What have I done wrong?</li>
</ol>

<p>Thanks in advance!</p>

<hr>

<pre><code>class ProfileVC: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate {
var imagePicker: UIImagePickerController!
</code></pre>

<hr>

<pre><code>override func viewDidLoad() {
    super.viewDidLoad()

    imagePicker = UIImagePickerController()
    imagePicker.delegate = self
}
</code></pre>

<hr>

<pre><code>@IBAction func selectPhotoPressed(sender: UITapGestureRecognizer) {
    if UIImagePickerController.isSourceTypeAvailable(.PhotoLibrary) {
        self.imagePicker.sourceType = .PhotoLibrary
    } else {
        self.imagePicker.sourceType = .Camera
    }
    imagePicker.allowsEditing = true
    imagePicker.mediaTypes = [kUTTypeImage as String]
    self.presentViewController(imagePicker, animated: true, completion: nil)
}
</code></pre>

<hr>

<pre><code>func imagePickerControllerDidCancel(picker: UIImagePickerController) {
    self.dismissViewControllerAnimated(true, completion: nil)
}

func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo image: UIImage, editingInfo: [String : AnyObject]?) {
    headerView.profilePhoto.contentMode = .ScaleAspectFill
    headerView.profilePhoto.image = image
    imagePicker.dismissViewControllerAnimated(true, completion: nil)
    uploadImage(image)
}
</code></pre>