Enable SwiftLint rule 'weak_delegate' and fix all violations
This commit is contained in:
parent
c5e88d82c9
commit
e1cb280d4a
5 changed files with 6 additions and 6 deletions
|
|
@ -192,7 +192,7 @@ whitelist_rules:
|
|||
- vertical_whitespace_closing_braces
|
||||
- vertical_whitespace_opening_braces
|
||||
- void_return
|
||||
# - weak_delegate
|
||||
- weak_delegate
|
||||
- xct_specific_matcher
|
||||
- xctfail_message
|
||||
- yoda_condition
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class QRScannerController: UIViewController, AVCaptureMetadataOutputObjectsDeleg
|
|||
|
||||
let supportedCodeTypes = [AVMetadataObject.ObjectType.qr]
|
||||
|
||||
var delegate: QRScannerControllerDelegate?
|
||||
weak var delegate: QRScannerControllerDelegate?
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ protocol FillPasswordTableViewCellDelegate: AnyObject {
|
|||
|
||||
class FillPasswordTableViewCell: UITableViewCell, ContentProvider {
|
||||
@IBOutlet var contentTextField: UITextField!
|
||||
var delegate: FillPasswordTableViewCellDelegate?
|
||||
|
||||
@IBOutlet var settingButton: UIButton!
|
||||
@IBOutlet var generateButton: UIButton!
|
||||
|
||||
weak var delegate: FillPasswordTableViewCellDelegate?
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class SliderTableViewCell: UITableViewCell {
|
|||
private var checker: ((Int) -> Bool)!
|
||||
private var updater: ((Int) -> Void)!
|
||||
|
||||
private var delegate: PasswordSettingSliderTableViewCellDelegate!
|
||||
private weak var delegate: PasswordSettingSliderTableViewCellDelegate!
|
||||
|
||||
@IBAction
|
||||
private func handleSliderValueChange(_ sender: UISlider) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class SwitchTableViewCell: UITableViewCell {
|
|||
|
||||
private var updater: ((Bool) -> Void)!
|
||||
|
||||
private var delegate: PasswordSettingSliderTableViewCellDelegate!
|
||||
private weak var delegate: PasswordSettingSliderTableViewCellDelegate!
|
||||
|
||||
@IBAction
|
||||
private func switchValueChanged(_: Any) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue