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 回答