ios - Second thoughts on a tried code - Your views please -
i have been using thiscode years in app uses mapkit , corelocation frameworks:
if ((abs(howrecent) < 5.0) && ((newlocation.horizontalaccuracy > 0.0f && newlocation.horizontalaccuracy < 150.0f)) )
however, having second thoughts following reason:
- i intended test first location update old update on first attempt. being checked on each update
location awareness programming guide page 14 gives check:
if (abs(howrecent) < 15.0) {
the programing guide not mention horizontal accuracy if in cllocation class definition
am being cautious checking accuracy time? appreciate views if works well, if code throwing valid location update, won't know it. btw, app supports ios 4.3 6 , wrote version 3 , has updated on version 4. thank responses.
i suggest looked following:
- (void)locationmanager:(cllocationmanager*)manager didupdatelocations:(nsarray *)locations { cllocation *loc2 = [[cllocation alloc] init]; loc2 = [locations lastobject];
then you're handling last location reported. if need specific horizontal accuracy - check
Comments
Post a Comment