Skip to content

这是一个可以左右滑动显示当前月份的日历

License

Notifications You must be signed in to change notification settings

jzb4068/ZBCalendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image

示例代码

ZBCalendarCollectionView*collection = [[ZBCalendarCollectionView alloc]initWithFrame:CGRectMake(0, 100, CGRectGetWidth(self.view.frame), 80)];
    collection.selectedBlock = ^(NSDate* date){
        NSDateFormatter *year = [[NSDateFormatter alloc]init];
        [year setDateFormat:@"yyyy"];
        NSString *yearstr = [year stringFromDate:date];
        NSDateFormatter *month = [[NSDateFormatter alloc]init];
        [month setDateFormat:@"MM"];
        NSString *monthstr = [month stringFromDate:date];
        NSDateFormatter *day = [[NSDateFormatter alloc]init];
        [day setDateFormat:@"dd"];
        NSString *daystr = [day stringFromDate:date];
        NSLog(@"%@:%@:%@",yearstr,monthstr,daystr);
    };
    [self.view addSubview:collection];

About

这是一个可以左右滑动显示当前月份的日历

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages