• Cocoa touch(十):UIDatePicker


    UIDatePicker,日期选取器

    typedef NS_ENUM(NSInteger, UIDatePickerMode) {
        UIDatePickerModeTime,           // Displays hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. 6 | 53 | PM)
        UIDatePickerModeDate,           // Displays month, day, and year depending on the locale setting (e.g. November | 15 | 2007)
        UIDatePickerModeDateAndTime,    // Displays date, hour, minute, and optionally AM/PM designation depending on the locale setting (e.g. Wed Nov 15 | 6 | 53 | PM)
        UIDatePickerModeCountDownTimer  // Displays hour and minute (e.g. 1 | 53)
    };
    
    @interface UIDatePicker : UIControl <NSCoding>
    
    @property(nonatomic) UIDatePickerMode datePickerMode;             // default is UIDatePickerModeDateAndTime
    
    @property(nonatomic,retain) NSLocale      *locale;                // default is [NSLocale currentLocale]. setting nil returns to default
    @property(nonatomic,copy)   NSCalendar    *calendar;              // default is [NSCalendar currentCalendar]. setting nil returns to default
    @property(nonatomic,retain) NSTimeZone    *timeZone;              // default is nil. use current time zone or time zone from calendar
    
    @property(nonatomic,retain) NSDate        *date;                  // default is current date when picker created. Ignored in countdown timer mode. for that mode, picker starts at 0:00
    
    @property(nonatomic,retain) NSDate        *minimumDate;           // specify min/max date range. default is nil. When min > max, the values are ignored. Ignored in countdown timer mode
    @property(nonatomic,retain) NSDate        *maximumDate;           // default is nil
    @property(nonatomic)        NSTimeInterval countDownDuration;     // for UIDatePickerModeCountDownTimer, ignored otherwise. default is 0.0. limit is 23:59 (86,399 seconds)
    @property(nonatomic)        NSInteger      minuteInterval;        // display minutes wheel with interval. interval must be evenly divided into 60. default is 1. min is 1, max is 30
    
    - (void)setDate:(NSDate *)date animated:(BOOL)animated;           // if animated is YES, animate the wheels of time to display the new date
    
    @end
  • 相关阅读:
    [GDKOI2010] 圈地计划(网络流)
    jzoj3454 表白(love)解题报告(01分数规划+DP)
    数论之卢卡斯定理
    POJ1180 Batch Scheduling 解题报告(斜率优化)
    BZOJ 球形空间产生器 解题报告(高斯消元)
    你是怎么封装一个view的
    沙盒目录结构是怎样的?各自用于那些场景?
    这个写法会出什么问题: @property (copy) NSMutableArray *array;
    怎么用 copy 关键字?
    @property后面可以有哪些修饰符?
  • 原文地址:https://www.cnblogs.com/iprogrammer/p/3252698.html
Copyright © 2020-2023  润新知