Pattern: Use of Interface Builder
Issue: -
Creating views using Interface Builder should be avoided.
Examples of correct code:
class ViewController: UIViewController {
var label: UILabel!
}
class ViewController: UIViewController {
@objc func buttonTapped(_ sender: UIButton) {}
}
Examples of incorrect code:
class ViewController: UIViewController {
@IBOutlet ↓var label: UILabel!
}
class ViewController: UIViewController {
@IBAction ↓func buttonTapped(_ sender: UIButton) {}
}