KVO for property of a different class
I would like to add an observer to my UIViewController for a property in my application sub.
is it possible like below code?
myAppDelegate *appDelegate = (myAppDelegate *)[[UIApplication sharedApplication] delegate] ; [self addObserver:self forKeyPath:appDelegate.currentLocation options:0 context:nil];
the problem is expecting the value for "forKeyPath" to be NSString.
source to share