Skip to content

Commit

Permalink
Payload warning (#2231)
Browse files Browse the repository at this point in the history
* update method name

* update warning method

* update methods name

* most suitable method names

* most suitable method names (2)
  • Loading branch information
mlorenze committed Sep 28, 2022
1 parent 044e316 commit eed00a3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Source/Rows/Common/DateFieldRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ open class DateCell: Cell<Date>, CellType {
accessoryType = .none
editingAccessoryType = .none
datePicker.datePickerMode = datePickerMode()
datePicker.addTarget(self, action: #selector(DateCell.datePickerValueChanged(_:)), for: .valueChanged)
datePicker.addTarget(self, action: #selector(DateCell.datePickerValueDidChange(_:)), for: .valueChanged)

#if swift(>=5.2)
if #available(iOS 13.4, *) {
Expand Down Expand Up @@ -89,7 +89,7 @@ open class DateCell: Cell<Date>, CellType {
return datePicker
}

@objc(pickerDateChanged:) func datePickerValueChanged(_ sender: UIDatePicker) {
@objc(datePickerValueDidChange:) func datePickerValueDidChange(_ sender: UIDatePicker) {
row.value = sender.date
detailTextLabel?.text = row.displayValueFor?(row.value)
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Rows/DatePickerRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ open class DatePickerCell: Cell<Date>, CellType {
editingAccessoryType = .none
height = { UITableView.automaticDimension }
datePicker.datePickerMode = datePickerMode()
datePicker.addTarget(self, action: #selector(DatePickerCell.datePickerValueChanged(_:)), for: .valueChanged)
datePicker.addTarget(self, action: #selector(DatePickerCell.datePickerValueDidChange(_:)), for: .valueChanged)

if datePicker.datePickerMode != .countDownTimer {
#if swift(>=5.2)
Expand Down Expand Up @@ -87,7 +87,7 @@ open class DatePickerCell: Cell<Date>, CellType {
}
}

@objc(pickerDateChanged:) func datePickerValueChanged(_ sender: UIDatePicker) {
@objc(datePickerValueDidChange:) func datePickerValueDidChange(_ sender: UIDatePicker) {
row?.value = sender.date

// workaround for UIDatePicker bug when it doesn't trigger "value changed" event after trying to pick 00:00 value
Expand Down
2 changes: 1 addition & 1 deletion Source/Rows/SegmentedRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ open class SegmentedCell<T: Equatable> : Cell<T>, CellType {
segmentedControl.isEnabled = !row.isDisabled
}

@objc (valueDidChange) func valueChanged() {
@objc (segmentedValueDidChange) func valueChanged() {
row.value = (row as! OptionsRow<Self>).options?[segmentedControl.selectedSegmentIndex]
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Rows/SliderRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ open class SliderCell: Cell<Float>, CellType {
slider.isEnabled = !row.isDisabled
}

@objc (valueDidChange) func valueChanged() {
@objc (sliderValueDidChange) func valueChanged() {
let roundedValue: Float
let steps = Float(sliderRow.steps)
if steps > 0 {
Expand Down
2 changes: 1 addition & 1 deletion Source/Rows/StepperRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ open class StepperCell: Cell<Double>, CellType {
valueLabel?.text = row.displayValueFor?(row.value)
}

@objc(valueDidChange) func valueChanged() {
@objc(stepperValueDidChange) func valueChanged() {
row.value = stepper.value
row.updateCell()
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Rows/SwitchRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ open class SwitchCell: Cell<Bool>, CellType {
switchControl.isEnabled = !row.isDisabled
}

@objc (valueDidChange) func valueChanged() {
@objc (switchValueDidChange) func valueChanged() {
row.value = switchControl?.isOn ?? false
}
}
Expand Down

0 comments on commit eed00a3

Please sign in to comment.