Try this instead:
CLLocationDistance meters = [newLocation distanceFromLocation:oldLocation];
The method you’re trying to use is a method on a CLLocation object 🙂
More Related Contents:
- How do I get a background location update every n minutes in my iOS application?
- Periodic iOS background location updates
- Background Location Services not working in iOS 7
- Get Location Updates for iOS App Even when Suspended
- Start Location Manager in iOS 7 from background task
- Calculating bearing between two CLLocationCoordinate2Ds
- iPhone GPS in background never resumes after pause
- Centering MKMapView on spot N-pixels below pin
- deferredLocationUpdatesAvailable returns NO in iOS 10
- Region Monitoring Glitch on iOS 7 – Multiple Notifications at the same time
- How to force NSLocalizedString to use a specific language
- How to force view controller orientation in iOS 8?
- SpriteKit – Creating a timer
- SWrevealViewController without using navigationController
- didFailWithError: Error Domain=kCLErrorDomain Code=0 “The operation couldn’t be completed. (kCLErrorDomain error 0.)”
- How to add a touch event to a UIView?
- Cut transparent hole in UIView
- afnetworking 3.0 Migration: how to POST with headers and HTTP Body
- iOS 7 – Difference between viewDidLoad and viewDidAppear
- “From View Controller” disappears using UIViewControllerContextTransitioning
- Restrict to certain iOS target devices for App Store submission
- How to throttle search (based on typing speed) in iOS UISearchBar?
- iOS 10 error [access] when using UIImagePickerController
- What is “error in __connection_block_invoke_2: Connection interrupted” in iOS?
- Swift doesn’t convert Objective-C NSError** to throws
- Class is implemented in both. One of the two will be used
- performSegueWithIdentifier very slow when segue is modal
- iOS 11 large-title navigation bar not collapsing
- locationManager:didEnterRegion not called when a beacon is detected
- Upload image to the PHP server from iOS