Skip to content

Commit

Permalink
Move code that set attributes of DatePicker to appropriate place
Browse files Browse the repository at this point in the history
  • Loading branch information
woin2ee committed Jan 18, 2024
1 parent c723b58 commit a8d25c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ final class DatePickerCell: RxBaseReusableCell {
let date: Date
}

let trailingDatePicker: UIDatePicker = .init().then {
$0.minuteInterval = 5
}
let trailingDatePicker: UIDatePicker = .init()

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public final class PushNotificationSettingsViewController: RxBaseViewController,
let cell = tableView.dequeueReusableCell(DatePickerCell.self, for: indexPath)
cell.prepareForReuse()
cell.trailingDatePicker.datePickerMode = .time
cell.trailingDatePicker.minuteInterval = 5

guard let date = Calendar.current.date(from: reactor.currentState.reminderTime) else {
preconditionFailure("Failed to create Date instance with DateComponents.")
Expand Down

0 comments on commit a8d25c2

Please sign in to comment.