title: Wait until Boolean is True in Swift?
body: <p>I have cells that have buttons that trigger the downloading of their respective PDF from online. I want it so that only one download can occur at a time, and the other ones (if their button is clicked) wait for it to finish. </p>
  
  <p>I cannot use any sort of queue, because the queue operation calls the download methods but does not wait for them to complete before moving on. </p>
  
  <p>Is there any way that I can only move on once the did finish download function says that it is ready by passing a boolean or something? I am pretty lost here so any direction is greatly appreciated. </p>