3
私は、アプリケーションデリゲートのプロパティのUIViewControllerにオブザーバを追加したいと思います。別のクラスのプロパティのKVO
以下のコードは可能ですか?
myAppDelegate *appDelegate = (myAppDelegate *)[[UIApplication sharedApplication] delegate] ;
[self addObserver:self
forKeyPath:appDelegate.currentLocation
options:0
context:nil];
「forKeyPath」の値がNSStringであると予想される問題です。