I have found here a similar old post: showsUserLocation does not display blue dot in iPhone 4.0
我有这一法典:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
locationManager=[[CLLocationManager alloc]init];
[locationManager setDelegate:self];
[locationManager setDistanceFilter:kCLDistanceFilterNone];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
//[locationManager startUpdatingLocation];
mapView.showsUserLocation=YES;
NSLog(@"bool: %d", [mapView showsUserLocation]);
// Override point for customization after application launch.
self.viewController = [[[WhereamiViewController alloc] initWithNibName:@"WhereamiViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
为什么NS Carlo(@"bool: %d”、“地图显示UserLocation”)
显示<0,而不是1
? 为什么我把它定在<代码>YES上?