这段代码有什么问题?
NSString *strTest = @"Sun Apr 12 23:29:24 +0000 2009";
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"MM/dd/yy"];
NSDate *createdAtFormatted = [dateFormatter dateFromString:strTest];
self.createdAt.text = [dateFormatter stringFromDate:createdAtFormatted];
self.createdAt 是一个 UILabel 并且它保持为空。为什么?
尝试使用 dateWithNaturalLanguageString 时,我得到: