Joined May 2013
·

Igor

codecentric AG
·
Novi Sad, Serbia
·
·

Posted to Method to convert NSDate to NSString over 1 year ago

Just one more note regarding +[NSCalendar currentCalendar]. Although +[NSCalendar currentCalendar] is static method, it doesn't reuse one instance of calendar, but creates new instance over and over again. Apple recommendation is create calendar once and reuse it. In your particular case the calendar should be created outside of desiredMethodName: method.

Also, @mrnickbarker is right about NSDateFormatter. Apple recommends that each date format has it's own NSDateFormatter instance, and because initialization of NSDateFormatters is expansive and setDateFormat is also expensive, it should be cached. Create it once and use it over and over again.

Posted to Force to use Legacy UI on iOS 7 apps over 1 year ago

Did you submit an app with this code?
IMHO, it probably will not be acceptible on the AppStore due to use of private and probably future-unsupported API.

Achievements
8 Karma
0 Total ProTip Views
Interests & Skills