2011-02-05 2 views
0

のAppleアプリをAppleに提出しました。私は、 "-descriptionWithCalendarFormat:timeZone:locale"というプロセスでプライベートAPIを使用していました。現在のコードに代わるものを見つけるには"-descriptionWithCalendarFormat:timeZone:locale"の代わりに

NSString *lastSyncDate = [store.lastSync descriptionWithCalendarFormat:@"%Y-%m-%d %H:%M:%S" timeZone:[NSTimeZone timeZoneForSecondsFromGMT:0] locale:nil]; 

これにはどのようなコードを置き換えるのが最適でしょうか?

答えて

1

NSDateFormatterを作成して設定してから、-[NSDateFormatter stringFromDate:]に電話してください。