TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | BSD |
ReleasedLast Release | Dec 2014 |
Maintained by Adam Kirk.
A picker for choosing date components. Allows some components to be undefined.
In your Podfile, add this line:
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