I try to get NSDate objects from NSString which I get from sqlite, but there is a time problem. I takes me 130ms every time. And it’s insufferable for i have two hundred objects to deal with. So can somebody tell me what i should do. Thanks.
Share
Assuming you’re using
NSDateFormatter, you should attend to Apple’s recommendation, caching formatters for efficiency. Instead of creating aNSDateFormattereach time you want to convert a date, you should keep a single instance of yourNSDateFormatter. From Data Formatting guide: