Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use UIImpactFeedbackGenerator with objective c?

Does any one know how to use UIImpactFeedbackGenerator with objective c in iOS? I cannot find any examples anywhere. I am using a framework that requires objective c, so it cannot be swift.

Thanks, Scott

like image 794
Scott Harrison Avatar asked Sep 20 '16 17:09

Scott Harrison


1 Answers

I figured it out

UIImpactFeedbackGenerator *myGen = [[UIImpactFeedbackGenerator alloc] initWithStyle:(UIImpactFeedbackStyleMedium)];
[myGen impactOccurred];
myGen = NULL;
like image 109
Scott Harrison Avatar answered Sep 24 '22 15:09

Scott Harrison