iOS2012. 9. 9. 19:24

- (NSString *)getFileName {

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];

[dateFormatter setDateFormat:@"yyyyMMdd_hhmmss_"];

NSDate *date = [[NSDate alloc] init];

NSString *fileName = [NSString stringWithFormat:@"%@%@",

  [dateFormatter stringFromDate:date],

  [[[NSString stringWithFormat:@"%f", [[NSDate date]timeIntervalSince1970]] componentsSeparatedByString:@"."] objectAtIndex:1]];

[date release];

[dateFormatter release];

return fileName;

}

Posted by 다오나무