Dans iPhone SDK, nous pouvons observer que des objets, et non comme struts CLLocationCoordinate2D?
Exemple: J'ai un code très simple où je voudrais observer une propriété de type CLLocationCoordinate2D, je me suis assuré de faire la synthèse dans ABC.m.
@interface ABC
{
CLLocationCoordinate2D currentLocation;
}
@property (nonatomic, readwrite) CLLocationCoordinate2D currentLocation;
Maintenant, dans une autre classe que je fais:
[ABC addObserver:self forKeyPath:@currentLocation options:NSKeyValueObservingOptionNew context:NULL];
Pour une raison quelconque, la méthode observeValueForKeyPath ne retourne jamais que keypath « currentLocation» changé.
Merci,
SJS













