PGDatePicker icon indicating copy to clipboard operation
PGDatePicker copied to clipboard

自定义picker滚动会超出范围,会造成选中行空白

Open BearLatte opened this issue 2 years ago • 0 comments

private lazy var datePicker = { () -> PGDatePicker in let picker = PGDatePicker(frame: CGRect(x: 0, y: 0, width: Constant.screenWidth, height: 150)) picker.rowHeight = 44 picker.minimumDate = Calendar.current.date(byAdding: .year, value: -100, to: Date()) picker.maximumDate = Date() picker.setDate(Date()) picker.datePickerMode = .date picker.delegate = self picker.textColorOfSelectedRow = UIColor.tm.hexColor(0x333333) picker.textColorOfOtherRow = UIColor.tm.hexColor(0x666666) picker.textFontOfOtherRow = UIFont.systemFont(ofSize: 15) picker.textFontOfSelectedRow = UIFont.systemFont(ofSize: 15) picker.isHiddenWheels = false picker.lineBackgroundColor = UIColor.tm.hexColor(0xeaeaea) picker.showUnit = .all return picker }()

这样设置添加到视图中,填充数据后,可滚动位置会变大,滚动到最底部就会造成选中行全部空白,这是我设置的问题还是内部计算的bug,我看demo中并没有这个问题

BearLatte avatar Nov 02 '21 10:11 BearLatte