Returns the distance value parsed from the specified string.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.2+
- watchOS 2.0+
A formatted string that specifies a distance.
The distance value represented by the string or
-1 if the string does not contain a recognized distance value.
This method searches the provided string for a number that could represent a distance. Distances must be specified as purely numerical values. Do not specify distances as fractions such as "1/4 mile".