How to perform a task after the completion of a previous task SWIFT
I am fairly new to programming and I have two buttons, one is camera the other is chooseExistingPhoto. I can access the camera functionality with the camera button and am trying to diplay the image that I take onto a UIImage in another view controller. My code is giving me an error of unable to render snapshot before it is taken. I assume that this is because I am also trying to use the button as a segue to display the new view controller. Is there a way to delay the segue action until after the user picks and image through their photo library or takes a photo?