English 中文(简体)
为什么我能够把意见绘制到YESOS?
原标题:why I can t set mapView.showsUserLocation to YES in iOS?

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上?

问题回答

你的申请可能已经结束,但也许你们的意见没有装上。 如果该观点装上了它所赢得的“地图”。 引领显示UserLocation代码以观察DidLoad





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签