Este producto no es compatible con el sitio Datadog seleccionado. ().
Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tienes alguna pregunta o comentario sobre nuestro actual proyecto de traducción, no dudes en ponerte en contacto con nosotros.

Metadata

ID: swift-code-style/iboutlet-private

Language: Unknown

Severity: Notice

Category: Best Practices

Description

All variables of type IBOutlet should be set as private. IBOutlet variables are typically used in Swift to connect the UI elements from the storyboard to the code. Making these variables private enhances encapsulation and data hiding, which are fundamental principles of object-oriented programming.

Non-Compliant Code Examples

class MyClass {
    @IBOutlet var label: UILabel!
}

Compliant Code Examples

class MyClass {
    @IBOutlet private var label: UILabel!
}
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Integraciones sin problemas. Prueba Datadog Code Security