How to convert NSMutableString to double for storage in Core Data?

my application needs to store latitude and longitude values ​​parsed from XML to Core Data. I currently have a basic data model for which these attributes are set to type double. In the header file for the model object, they are defined asNSNumber

How to convert a string stored in my variable CurrentNodeTextto the required type to store in Core Data? Also, is this a suitable way to store coordinate data in Core Data?

+3
source share
1 answer

NSString doubleValue, , , double , ( 0.0, ).

: . , . -, , , - , , , , . , NSDecimalNumber, NSDecimal NSString.

+5

Source: https://habr.com/ru/post/1734171/


All Articles