Skip to content

Commit

Permalink
fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cindy-x-liang committed Jun 2, 2024
1 parent 7abe36a commit acb43b4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions TCAT/Views/DatePickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ class DatePickerView: UIView {
styleSegmentedControl(timeTypeSegmentedControl)
setSegmentedControlOptions(timeTypeSegmentedControl, options: [leaveNowElement.title,leaveAtElement.title, arriveByElement.title])
timeTypeSegmentedControl.selectedSegmentIndex = leaveNowElement.index
timeTypeSegmentedControl.addTarget(
self,
action: #selector(timeTypeSegmentedControlValueChanged(segmentControl:)),
for: .valueChanged
)

addSubview(timeTypeSegmentedControl)
}
Expand Down Expand Up @@ -180,7 +175,7 @@ class DatePickerView: UIView {
default:
break
}
}else {
} else {
//If the user for some reason changes the date/time on datepicker, but selects leaveNow
//we change the date/time on datepicker to be the current date/time
datepicker.date = Date()
Expand All @@ -195,9 +190,6 @@ class DatePickerView: UIView {

// MARK: - Segment Controls

@objc private func timeTypeSegmentedControlValueChanged(segmentControl: UISegmentedControl) {
}

@objc private func leaveNowSegmentedControlValueChanged(segmentControl: UISegmentedControl) {
datepicker.date = Date()
}
Expand Down

0 comments on commit acb43b4

Please sign in to comment.