I basically have to methods, which are being called in my viewDidLoad. The first one gets the user\'s search preferences and saves the preferences to variables at the top. A
Okay I've found an solution. I basically called the function at the end of the first one.
So basically:
var searchLocation = String()
var searchLocationCoordinates = [String:Double]()
var searchRange = Int()
override func viewDidLoad() {
super.viewDidLoad()
// Gets the user's search preference
getTheSearchLocationAndRange()
}
func getTheSearchLocationAndRange() {
// Code for getTheSearchLocationAndRange()
loadDataFromDatabase()
}
func loadDataFromDatabase(){
// Code for loadDataFromDatabase()
}