I am trying to get the current longitude and latitude right before the table loads and use the coordinates to make an HTTP request to get a list of nearby locations to display in a table. Right now, I am calling startUpdatingLocation
in viewWillLoad
, which is too late. My problem is that I can't seem to get the locations before the table loads, and as a result, the coordinates that are sent in the request are always (0,0).
What would be a better way to approach this?
Thank you!