사용자의 모바일 위치가 변경되었는지 30 초인지 여부를 확인해야하는 애플리케이션이 있습니까? 30 초 후에 변경되지 않으면 사용자가 다른보기로 이동하고 가 변경되면 사용자는 모바일 위치의 좌표가 30 초 동안 변경되었다는 메시지를 받게됩니다.아이폰 코어 위치
timer90 내 view.Please이 나를 도울 친구의 이름을 여기에 ...
-(void)time
{
for(int i = 0; i<= timeremaining ;i++)
{
if (new1 == old)
{
if(timeremaining == 1)
{
Timer90 *timerview = [[Timer90 alloc] initWithNibName:@"Timer90" bundle:nil];
[self.navigationController pushViewController:timerview animated:YES];
}
}
else
{
[NSTimer cancelPreviousPerformRequestsWithTarget:self selector:@selector(time) object:nil];
}
timeleft.text = [NSString stringWithFormat:@"%d",timeremaining];
}
timeremaining--;
}
-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
new1 = newLocation;
old=oldLocation;
latitude = [[NSString alloc]initWithFormat:@"%g",newLocation.coordinate.latitude];
longitude = [[NSString alloc]initWithFormat:@"%g",newLocation.coordinate.longitude];
accuracy = [[NSString alloc] initWithFormat:@"%g",newLocation.horizontalAccuracy];
if(oldLocation == NULL)
{
oldLocation == newLocation;
}
}
을 나는이 코드를 사용하고 있지만 아무것도하지 않습니다 ... 어떤 도움을 이해할 수있을 것이다.
WD의 distanceFromLocation에 대한 의견은 내 정확한 비교 대신 현명 할 것입니다. –