网站/小程序/APP个性化定制开发,二开,改版等服务,加扣:8582-36016

IOS打卡日历、可做签到等功能

应用介绍

作者laoou002,源码LOCalendar,LOCalendar 打卡日历、可做签到等功能的参考。

使用方法:

    //打卡日期
    NSArray *dakaArray = @[@"2019-12-01",@"2019-12-02",@"2020-01-01"];    self.calendarView = [[LOCalendarView alloc] initWithDakaArray:dakaArray frame:CGRectMake(15, 80, [UIScreen mainScreen].bounds.size.width-30, 300)];
    [self.view addSubview:self.calendarView];    
    //圆角及边框样式(根据个人情况调整)
    self.calendarView.layer.cornerRadius = 10;    self.calendarView.layer.borderColor = [UIColor lightGrayColor].CGColor;    self.calendarView.layer.borderWidth = 2;    
    typeof(self) __weak weakSelf = self;    //调整高度
    [self.calendarView setReHeightBlock:^(CGFloat height) {
        
    }];    
    //修改月份
    [self.calendarView setChangeBlock:^(NSDate * _Nonnull date) {
        
    }];    
    //点击回调
    [self.calendarView setSelectBlock:^(NSDate *date, LODayButtonType type) {        if (type==LODayButtonTypeDisabled)
        {
            [LOToastView showWithMsg:@"不在打卡范围"];
        }        else if (type==LODayButtonTypeBuKa)
        {            //标记为已打卡
            [weakSelf.calendarView addDate:date];
            
            [LOToastView showWithMsg:@"补卡成功"];
        }        else if (type==LODayButtonTypeYiDaKa)
        {
            [LOToastView showWithMsg:@"已打卡"];
        }
    }];    //可补卡范围(默认为本周)
    self.calendarView.bukaRange = 30;    //刷新UI
    [self.calendarView reloadUI];

 


立即下载

温馨提示! 你需要支付 1.00P币后才可以下载

评论 共有 0 条评论

暂无评论
0
0
0
立即
投稿
发表
评论
返回
顶部