タイトルが示すように、ここにいくつかのコードがあります:
- (void)refreshMap {
NSLog(@"refreshing");
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
lat = [[NSNumber numberWithDouble:myUserLocation.coordinate.latitude] stringValue];
lon = [[NSNumber numberWithDouble:myUserLocation.coordinate.longitude] stringValue];
NSString *url = [[NSString alloc] initWithFormat:@"http://mywebsite.com/geo_search.json?lat=%@&lon=%@", lat, lon];
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:url]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
[url release];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
ネットワークアクティビティインジケーター(ステータスバー内)はまったく表示されません(シミュレーターにも実際のデバイスにも表示されません)。どうすればこれを解決できますか?