English 中文(简体)
地点服务问题。
原标题:Location services issue iPhone.?

I am developing an iPhone application. The problem i am facing is that in start of app i have to present two different views based on either user has enabled or disable location services,But location services alert comes after some seconds.How can i manage it.? Flow should be like this

a. 申请启动->地点警报显示——和; 用户新闻许可――和; 显示交易

a. 申请启动->地点警报显示——和; 用户不能允许――和;显示特定地点的观点。

问题回答

使用氯乙烯 只有在发射时才能看到发射地点警戒线。

使用氯乙烯 拥有代表的经理前往该地点。 如果失误,则检查错误代码,看看用户是否拒绝在附录中提供地点:

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {

    UIAlertView *alert;
    //denied?
    if(error.code == kCLErrorDenied) alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",@"Error title header") message:NSLocalizedString(@"Turn on Location Services in Settings to use your location",@"Turn on Location Services in Settings to use your location") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    else alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",@"Error title header") message:NSLocalizedString(@"At the moment it is not possible to retreive your location",@"At the moment it is not possible to retreive your location") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
    [alert release];
}




相关问题
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风格的解决办法,只是一个简单的袖珍流程......

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

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

热门标签