-
Notifications
You must be signed in to change notification settings - Fork 207
Description
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中并没有这个问题