From a8d25c24a8d8c950c2f5c46e6d71f5d59425daae Mon Sep 17 00:00:00 2001 From: Jaewon Yun Date: Thu, 18 Jan 2024 18:20:53 +0900 Subject: [PATCH] Move code that set attributes of DatePicker to appropriate place --- .../PushNotificationSettings/Cells/DatePickerCell.swift | 4 +--- .../PushNotificationSettingsViewController.swift | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/iOSScenes/PushNotificationSettings/Cells/DatePickerCell.swift b/Sources/iOSScenes/PushNotificationSettings/Cells/DatePickerCell.swift index b1a3b964..6834bea8 100644 --- a/Sources/iOSScenes/PushNotificationSettings/Cells/DatePickerCell.swift +++ b/Sources/iOSScenes/PushNotificationSettings/Cells/DatePickerCell.swift @@ -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) diff --git a/Sources/iOSScenes/PushNotificationSettings/PushNotificationSettingsViewController.swift b/Sources/iOSScenes/PushNotificationSettings/PushNotificationSettingsViewController.swift index 87e125f2..03dfc5cf 100644 --- a/Sources/iOSScenes/PushNotificationSettings/PushNotificationSettingsViewController.swift +++ b/Sources/iOSScenes/PushNotificationSettings/PushNotificationSettingsViewController.swift @@ -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.")