iphone - How to know I'm leaving from a location -
i'm using core location ios 6. have been searching find appropriate soln
my question is: - how can know if leaving point x (after cross it)?
- (void) locationmanager:(cllocationmanager *)manager didupdatetolocation:(cllocation *)newlocation fromlocation:(cllocation *)oldlocation cllocation *curpos = locationmanager.location; latitude = [[nsnumber numberwithdouble:curpos.coordinate.latitude] floatvalue]; longitude = [[nsnumber numberwithdouble:curpos.coordinate.longitude] floatvalue]; if (abs( latitude - xlocationlat)>0.1 ||abs( longitude - xlocationlon)>0.1 ) { nslog(@"he out"); } }
Comments
Post a Comment