Making an Alert Reaper After Taking Photo

  1. last year

    I have been working on this app for sometime now, and have recently come about this problem which I cannot get my head around.
    What I want to happen is:
    1. When the user holds down their finger on a map an alert appears which gives them the option of typing something in, canceling, taking a photo, and or pressing done (this is all shown below in the photo). Image of the alert
    When the user presses the take a photo option, they can pick a photo from their photo library
    Once they have chosen the photo, the same alert box reappears with all the previous information the user filled out there, and the default photo is replaced with the photo the user chose
    Step 3 is the part that I have no idea how to do, despite extensive googling. I would really appreciate your help. Thanks.
    Note: I have already tried adding "self.presentViewController(alert, animated: true, completion:{})" after the user selects their desired image, but this did not work.
    My code (just the part that regards the alert):

or Sign Up to reply!