Skip to content

[EC528] Swift port #313

@zippy1978

Description

@zippy1978

Shaking or vibrating an iOS device is possible using UIFeedbackGenerator.
Behind this effect stands a specific hardware component, the Taptic Engine, which consumes power. As a consequence, its usage should be carefully considered, especially if its added value is not clear.

Noncompliant Code Example

import UIKit

func triggerVibration() {
    let generator = UIImpactFeedbackGenerator(style: .heavy)
    generator.impactOccurred()
}

Metadata

Metadata

Assignees

Labels

🗃️ rulerule improvment or rule development or bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions