0
我有CLLocation变量声明,我给它的值,但是当我在其他地方使用它,与应用程序崩溃控制台“调试终止”没有任何日志应用程序崩溃与“调试终止”
CLLocation *userLoc;
-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
userLoc=newLocation;
[self somefunction];
}
-(void) somefunction
{
NSLog(@"%@",userLoc);
}
这里登录userLoc正确
但在我的另一种方法
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*) indexPath
{
NSLog(@"%@",userLoc);
}
这里应用程序崩溃。 请帮忙
我没有声望投票你回答了......但+1为你的答案..明白了解 – 2010-10-18 10:14:54