Try this instead:
CLLocationDistance meters = [newLocation distanceFromLocation:oldLocation];
The method you’re trying to use is a method on a CLLocation object 🙂
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
- How do I create delegates in Objective-C?
- Converting NSString to NSDate (and back again)
- UITextField text change event
- Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:
- Detect if the device is iPhone X
- How do I record audio on iPhone with AVAudioRecorder?
- When to use NSInteger vs. int
- iOS :How to get Facebook Album Photo’s Picker
- Detecting taps on attributed text in a UITextView in iOS
- UIActivityViewController crashing on iOS 8 iPads
- How can I load storyboard programmatically from class?
- Delete keychain items when an app is uninstalled
- Proper use of beginBackgroundTaskWithExpirationHandler
- When to use dequeueReusableCellWithIdentifier vs dequeueReusableCellWithIdentifier : forIndexPath
- How to play a local video with Swift?
- Customize UITableView header section
- MKMapView: Instead of Annotation Pin, a custom view
- How to make a push segue when a UITableViewCell is selected
- What is the AppDelegate for and how do I know when to use it?
- AFNetworking and background transfers
- iOS detect if user is on an iPad
- iOS: Issue with ampersand in the URL string
- UILabel with text of two different colors
- UIScrollView scroll to bottom programmatically
- ViewDidAppear is not called when opening app from background
- How can I use IBOutletCollection to connect multiple UIImageViews to the same outlet?
- How do you draw a line programmatically from a view controller?
- How to check if a view controller is presented modally or pushed on a navigation stack?
- Google plus API for posting on wall like Facebook
- How do I create a category in Xcode 6 or higher?
- iOS 6 Facebook posting procedure ends up with “remote_app_id does not match stored id”
- How do I implement the UITapGestureRecognizer into my application
- Emulating aspect-fit behaviour using AutoLayout constraints in Xcode 6
- setNeedsLayout vs. setNeedsUpdateConstraints and layoutIfNeeded vs updateConstraintsIfNeeded
- Xcode 7 UI Testing: how to dismiss a series of system alerts in code
- Handling Push Notifications when App is Terminated
- How to get Location user with CLLocationManager in swift?
- Best way to parse URL string to get values for keys?
- hiding keyboard ios [duplicate]
- Loop background music? [closed]
- How to change UITableViewRowAction title color?
- UICollectionView update a single cell