PGDatePicker icon indicating copy to clipboard operation
PGDatePicker copied to clipboard

开启循环模式时.选择1月或1日时 会报错

Open Hilery opened this issue 5 years ago • 1 comments

当isCycleScroll = true NSDate *date = [dateFormatter dateFromString: @"2019-01-01"]; [datePicker setDate:date animated:true]; newRow = row - self.copyOffsetCount; ====> -2 NSIndexPath *indexPath = [NSIndexPath indexPathForRow:newRow inSection:0]; [self.centerTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:true]; 抛异常.

Hilery avatar Jun 12 '19 07:06 Hilery

    if (newRow < 0 ) {
        newRow = self.datas.count + newRow;
    }

增加后暂时没有报错了 希望作者抽空再调试一下~

Hilery avatar Jun 12 '19 07:06 Hilery