iOS NSDatePicker

1、NSDate类

    1>NSDate是系统一个日期,时间类

    2>就是返回当前的日期,时间

    3>+(id)date;

    4>返回未来secs秒后的日期,时间

    5>+(id)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs;

    6>distantFuture/distantPast

      a>未来永远达不到的时间

      b>+(id)distantFuture;

      c>4001-01-01 00:00:00 +0000(设置一个未来永远达不到的时间)

      d>过去的时间

      e>+(id)distantPast;

      f>0001-01-01 00:00:00 +0000

  2、NSDateFormatter

    

  3、NSCalendar  

  

  4、UIDatePicker

  UIDatePicker事件处理

    1>UIControlEventValueChanged

    2>UIDatePicker每次值改变的时候就会处理该事件(连线的方式)

    3>事件处理方式

      [datePicker addTarget:self

         action:@selector(dateChanged:)

         forControlEvents:UIControlEventValueChanged];

原文地址:https://www.cnblogs.com/zhun/p/5492943.html