我的控制器(NSDatePicker
的子类)中定义了UIViewController
个实例:
@property (nonatomic, weak) IBOutlet UIDatePicker *datePicker;
我尝试将最短日期设置为比当前日期时间晚60秒:
-(void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// No known class method for selector "dateWithTimeIntervalSinceNow"
self.datePicker.minimumDate = [NSData dateWithTimeIntervalSinceNow:60];
}
但是我遇到了编译器错误:
No known class method for selector "dateWithTimeIntervalSinceNow"
我不明白为什么?