visit
Day 3: The earthly vibrations caught me off guard. 💂
struct HomeView: View {
let lightFeedback = UIImpactFeedbackGenerator(style: .light) // Change style
let mediumFeedback = UIImpactFeedbackGenerator(style: .medium)
let heavyFeedback = UIImpactFeedbackGenerator(style: .heavy)
var body: some View {
Button("Light Feedback") {
lightFeedback.impactOccurred() // Use this line for haptic feedback
}
Button("Medium Feedback") {
mediumFeedback.impactOccurred()
}
Button("Heavy Feedback") {
heavyFeedback.impactOccurred()
}
}
}
Happy Coding!