У меня есть несколько контроллеров представлений, которые должны получить местоположение пользователя, поэтому я хотел создать отдельный класс, который ViewControllers могут вызвать, чтобы получить последнее место пользователя.
locationManager: didUpdateToLocation: fromLocation возвращает void. Как передать данные широты и долготы обратно в мои ViewControllers, как только будут вычислены широта и долгота пользователя?
Я мог бы попытаться написать геттеры и сеттеры в моем locationManaging class, но если я это сделаю, как узнать, когда вызывать методы getter и longitude getter из моего класса ViewController? Как заставить основной поток ViewController ждать значений широты и долготы из класса locationManaging?
Спасибо!