My CLLocation object is located in a different object and one of my UI screens wants to update certain stats from that object, is it possible to use KVO to observe those changes for example, longitude and latitude.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Basically I wouldn’t rely on KVO with any Cocoa object or value that it isn’t explicitly documented to work for. Even if it worked, you couldn’t rely on its continuing to do so.
But CLLocationManager has a delegate (CLLocationManagerDelegate) to which all changes are reported, so why aren’t you using that? Or if some other object is the delegate already, why can’t you arrange for it to send your object a message, or at least post a notification? This sounds like any other elementary object communication problem.