Quantcast
Channel: On/Off haptic feedback Switch (Swift) - Stack Overflow
Viewing all articles
Browse latest Browse all 2

On/Off haptic feedback Switch (Swift)

$
0
0

I have SettingsVC ("Photo" there are 2 switch) and MainVC ("Code" there is a function for adding haptic feedback buttons).

How can I make it so that when you turn off the Switch in Setting, then the function would stop working?

SettingsVC "Photo"

@IBAction func Vib(_ sender: UIButton) {    let generator = UIImpactFeedbackGenerator(style: .light)    generator.impactOccurred()}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images