iPhone SDK では、Struts のようなオブジェクトではなく、オブジェクトのみを観察できCLLocationCoordinate2D
ますか?
例: type のプロパティを監視したい非常に単純なコードがありCLLocationCoordinate2D
、ABC.m で合成するようにしました。
@interface ABC
{
CLLocationCoordinate2D currentLocation;
}
@property (nonatomic, readwrite) CLLocationCoordinate2D currentLocation;
今別のクラスで私は:
[ABC addObserver:self forKeyPath:@"currentLocation" options:NSKeyValueObservingOptionNew context:NULL];
何らかの理由で、observeValueForKeyPath メソッドは、キーパス " currentLocation
" が変更されたことを報告しません。
ありがとう、
Sjs