Enable SwiftLint rule 'private_action' and fix all violations

This commit is contained in:
Danny Moesch 2020-07-05 22:49:53 +02:00 committed by Mingshen Sun
parent 70d605e412
commit fe380d4d65
17 changed files with 23 additions and 23 deletions

View file

@ -32,18 +32,18 @@ class FillPasswordTableViewCell: UITableViewCell, ContentProvider {
}
@IBAction
func generatePassword(_: UIButton) {
private func generatePassword(_: UIButton) {
delegate?.generateAndCopyPassword()
}
@IBAction
func showHidePasswordSettings() {
private func showHidePasswordSettings() {
delegate?.showHidePasswordSettings()
}
// re-color
@IBAction
func textFieldDidChange(_ sender: UITextField) {
private func textFieldDidChange(_ sender: UITextField) {
contentTextField.attributedText = Utils.attributedPassword(plainPassword: sender.text ?? "")
}

View file

@ -20,7 +20,7 @@ class SliderTableViewCell: UITableViewCell {
private var delegate: PasswordSettingSliderTableViewCellDelegate!
@IBAction
func handleSliderValueChange(_ sender: UISlider) {
private func handleSliderValueChange(_ sender: UISlider) {
let newRoundedValue = Int(sender.value)
// Proceed only if the rounded value gets updated.
guard checker(newRoundedValue) else {

View file

@ -18,7 +18,7 @@ class SwitchTableViewCell: UITableViewCell {
private var delegate: PasswordSettingSliderTableViewCellDelegate!
@IBAction
func switchValueChanged(_: Any) {
private func switchValueChanged(_: Any) {
updater(controlSwitch.isOn)
delegate.generateAndCopyPassword()
}