You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cell.topLabel.text=NSLocalizedString("Email note to customer", comment:"Label for yes/no switch - emailing the note to customer.")
159
-
cell.bottomLabel.text=NSLocalizedString("If disabled will add the note as private.", comment:"Detail label for yes/no switch.")
152
+
cell.title=NSLocalizedString("Email note to customer", comment:"Label for yes/no switch - emailing the note to customer.")
153
+
cell.subtitle=NSLocalizedString("If disabled will add the note as private.", comment:"Detail label for yes/no switch.")
160
154
cell.accessibilityTraits =.button
161
155
cell.accessibilityLabel =String.localizedStringWithFormat(NSLocalizedString("Email note to customer %@", comment:""), isCustomerNote ?NSLocalizedString("On", comment:"Spoken label to indicate switch control is turned on"):NSLocalizedString("Off", comment:"Spoken label to indicate switch control is turned off."))
162
156
cell.accessibilityHint =NSLocalizedString("Double tap to toggle setting.", comment:"VoiceOver accessibility hint, informing the user that double-tapping will toggle the switch off and on.")
163
157
164
-
cell.onToggleSwitchTouchUp={[weak self]in
158
+
cell.onChange={[weak self] newValuein
165
159
guardlet `self` =selfelse{
166
160
return
167
161
}
168
162
169
-
self.toggleNoteType()
163
+
self.isCustomerNote = newValue
170
164
self.refreshTextViewCell()
171
-
cell.accessibilityLabel =String.localizedStringWithFormat(NSLocalizedString("Email note to customer %@", comment:""),self.isCustomerNote ?NSLocalizedString("On", comment:"Spoken label to indicate switch control is turned on"):NSLocalizedString("Off", comment:"Spoken label to indicate switch control is turned off."))
172
-
cell.accessibilityHint =NSLocalizedString("Double tap to toggle setting.", comment:"VoiceOver accessibility hint, informing the user that double-tapping will toggle the switch off and on.")
173
-
letstateValue=self.isCustomerNote ?"on":"off"
165
+
166
+
cell.accessibilityLabel =String.localizedStringWithFormat(NSLocalizedString("Email note to customer %@", comment:""), newValue ?NSLocalizedString("On", comment:"Spoken label to indicate switch control is turned on"):NSLocalizedString("Off", comment:"Spoken label to indicate switch control is turned off."))
0 commit comments