0

MKReverseGeocoder を実際に終了させるのに苦労しています。これが私がすることです:

// reverse geocode the user location
geocoder = [[[MKReverseGeocoder alloc] initWithCoordinate:mapView.userLocation.location.coordinate] autorelease];
geocoder.delegate = self;
[geocoder start];

userLocation 座標は有効です。didFindPlacemark と didFailWithError があり、どちらもヒットしません...デリゲートの設定が間違っているか、わかりません...ヘッダーは次のとおりです。

@interface E_85AppDelegate : UIViewController <UIApplicationDelegate, MKMapViewDelegate, MKReverseGeocoderDelegate, CLLocationManagerDelegate>
{   
    IBOutlet UIWindow *window;
    IBOutlet UITabBarController* tabBarController;
    IBOutlet MKMapView*   mapView;
    IBOutlet MKReverseGeocoder* geocoder;
        // other class members...
}

何か案は?

4

1 に答える 1

1

明らかに、自動解放に関する私の理解はあまりよくありません。didFindPlacemark にメッセージが送信される前に、ジオコーダーを解放します。

于 2010-06-27T18:07:26.557 に答える