0
爲什麼產生NIL值?dateFromString產生NIL值 - 解決方案
NSString *danceDateValue = self.yourvariable.text;
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"MM-dd-yy"];
NSDate *date = [dateFormat dateFromString: danceDateValue];
NSLog(@"date input value: %@", danceDateValue);
NSLog(@"date input value: %@", date);
錯誤的格式...重複數百次。 – 2013-08-02 15:26:54
檢查這個職位 [http://stackoverflow.com/questions/3076370/where-to-look-up-the-date-format-specifiers-used-in-cocoa-cocoa-touch][1] [1]:http://stackoverflow.com/questions/3076370/where-to-look-up-the-date-format-specifiers-used-in-cocoa-cocoa-touch – Toploulou
什麼答案你是否期望如果你甚至不顯示你的輸入字符串? –