Skip to content

Commit f72e2bf

Browse files
author
UQ Times
committed
コメント・ログ出力の微修正
MKReverseGeocoderを使ったサンプルのURLを修正
1 parent c19c142 commit f72e2bf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CoreLocationSample-Geocoding/CoreLocationSample-Geocoding/ViewController.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ - (void)viewDidUnload
5353
[super viewDidUnload];
5454
}
5555

56-
- (void)dealloc {
56+
- (void)dealloc
57+
{
5758
[_geocoder release];
5859
[_addressesArray release];
5960

@@ -122,7 +123,7 @@ - (IBAction)searchPlaceName:(id)sender {
122123
}
123124

124125
- (IBAction)convertCoordinate:(id)sender {
125-
// 緯度が正しいかをチェック
126+
// 緯度・経度が正しいかをチェック
126127
if (![self coordinateIsValid]) {
127128
return; // エラーがあれば変換しない
128129
}
@@ -177,7 +178,7 @@ - (BOOL)placeNameIsValid
177178
}
178179

179180
/* 入力されている値が、正しい緯度・経度であるかを判定
180-
* CLLocationCoordinate2DIsValid だと、緯度か経度のどちらが誤っているか検知できない
181+
* CLLocationCoordinate2DIsValid だと、緯度か経度のどちらが誤っているかを検知できない
181182
*/
182183
- (BOOL)coordinateIsValid
183184
{
@@ -263,7 +264,7 @@ - (NSString *)errorToString:(NSError *)error
263264
case kCLErrorGeocodeCanceled:
264265
return @"Canceled";
265266
default:
266-
return [error description];
267+
return [error localizedDescription];
267268
}
268269
}
269270

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CLGeocoderを利用したジオコーディングのため、iOS 5.0以降でのみ動作します。
22
MKReverseGeocoderを利用したジオコーディングの出力にはGoogleマップを利用しなければならないため、
33
以下のURLでサンプルを公開しています。
4-
5-
https://github.com/uqtimes/iOS-SampleCodes/CoreLocationSample-MKReverseGeocoder
4+
https://github.com/uqtimes/iOS-SampleCodes/tree/master/CoreLocationSample-MKReverseGeocoder

0 commit comments

Comments
 (0)