我想在我的UIViewController中为我的应用程序委托(delegate)中的属性添加观察者。可以像下面的代码吗?myAppDelegate*appDelegate=(myAppDelegate*)[[UIApplicationsharedApplication]delegate];[selfaddObserver:selfforKeyPath:appDelegate.currentLocationoptions:0context:nil];它期望“forKeyPath”的值为NSString的问题。 最佳答案 myAppD