strong_iboutlet - ApplebaumIan/BitbucketAPI GitHub Wiki
Strong IBOutlet
@IBOutlets shouldn't be declared as weak.
- Identifier: strong_iboutlet
- Enabled by default: Disabled
- Supports autocorrection: No
- Kind: lint
- Analyzer rule: No
- Minimum Swift compiler version: 3.0.0
- Default configuration: warning
Non Triggering Examples
class ViewController: UIViewController {
@IBOutlet var label: UILabel?
}
class ViewController: UIViewController {
weak var label: UILabel?
}
Triggering Examples
class ViewController: UIViewController {
@IBOutlet weak ↓var label: UILabel?
}
class ViewController: UIViewController {
@IBOutlet unowned ↓var label: UILabel!
}
class ViewController: UIViewController {
@IBOutlet weak ↓var textField: UITextField?
}