2

エラーを処理しようとしていますが、どのような種類のエラーが返されるかを知るのは非常に困難です。たとえば、次のデリゲート メソッドをマップ ビュー操作から呼び出します。

- (void) reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error;

この方法で送信される可能性のあるエラーの種類を知るにはどうすればよいですか? エラーカタログ全体を処理する必要はありません... :-)

4

1 に答える 1

0

MKReverseGeocoder.h 言います:

// There are at least two types of errors:
//   - Errors sent up from the underlying connection (temporary condition)
//   - Result not found errors (permanent condition).  The result not found errors
//     will have the domain MKErrorDomain and the code MKErrorPlacemarkNotFound
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error;

質問する前にドキュメントとヘッダーを読むべきだと思います。

于 2011-07-16T14:32:42.227 に答える