您好,我想提出一種基於GPS的應用程序......我已測試了它在iPhone模擬器3.0做工精細..檢查wheather GPS可用與否在iphone
但是當GPS不可用,我想生成警報...(我只是刪除了互聯網連接) 我用下面的方法,但沒有奏效....
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
NSLog(@"Error: %@", [error description]);
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error getting Current Location" message:@"Please check your Internet connection" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alertView show];
[alertView release];
}
所以請告訴我該怎麼做 (目前正在iphone 3.0)
請也請告訴我是否ift這app.to iPhone 4將它的工作...問,因爲我聽說,iPhone 4有GPS問題...對於這個我試圖在模擬器4.0 ...但它失敗了...
CoreLocation!= GPS。 iOS設備還可以通過其他方式找到它們的位置。您應該查看Apple網站上提供的CoreLocation文檔,示例代碼和視頻演示文稿。另外,在一個問題中說「失敗」幾乎毫無細節。 – Nick 2010-09-18 16:36:23