MTDateComponentsPicker 0.0.3

MTDateComponentsPicker 0.0.3

测试已测试
语言语言 Objective-CObjective C
许可证 BSD
发布上次发布2014年12月

Adam Kirk维护。



  • Adam Kirk

一个用于选择日期组件的选择器。允许某些组件未定义。

安装

在您的 Podfile 中添加以下行

pod "MTDateComponentsPicker"

pod? => https://github.com/CocoaPods/CocoaPods/

示例用法

#import <MTDateComponentsPicker.h>

@interface YourClass <MTDateComponentsPickerDelegate>
// In this case, I just dragged a UIPicker on my view controller xib and gave it a class of MTDateComponentsPicker and connected this outlet.
@property (weak, nonatomic) IBOutlet MTDateComponentsPicker *dateComponentsPicker;
@end


@implementation

- (void)viewDidLoad
{
    _dateComponentsPicker.dateComponents = [[NSDateComponents alloc] init];
    _dateComponentsPicker.onChange = ^(NSDateComponents *pickedDateComponents){
        NSLog(@"%@", pickedDateComponents);
    };
}

@end