-
-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathVibration.h
More file actions
32 lines (27 loc) · 780 Bytes
/
Vibration.h
File metadata and controls
32 lines (27 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/**
Enum representing different vibration types.
*/
typedef NS_ENUM(NSInteger, VibrationType) {
VibrationTypeError,
VibrationTypeSuccess,
VibrationTypeWarning,
VibrationTypeLight,
VibrationTypeMedium,
VibrationTypeHeavy,
VibrationTypeSoft, // iOS 13.0+
VibrationTypeRigid, // iOS 13.0+
VibrationTypeSelection,
VibrationTypeOldSchool
};
/**
This class provides a method to generate different types of haptic/vibration feedback.
*/
@interface Vibration : NSObject
/**
Generates a haptic/vibration feedback based on the provided type.
@param type A value from the VibrationType enum indicating the desired feedback.
*/
+ (void)vibrateWithType:(VibrationType)type;
@end