-
Notifications
You must be signed in to change notification settings - Fork 329
/
JGProgressHUD-Defines.h
76 lines (70 loc) · 2.31 KB
/
JGProgressHUD-Defines.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//
// JGProgressHUD-Defines.h
// JGProgressHUD
//
// Created by Jonas Gessner on 28.04.15.
// Copyright (c) 2015 Jonas Gessner. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
Positions of the HUD.
*/
typedef NS_ENUM(NSUInteger, JGProgressHUDPosition) {
/** Center position. */
JGProgressHUDPositionCenter = 0,
/** Top left position. */
JGProgressHUDPositionTopLeft,
/** Top center position. */
JGProgressHUDPositionTopCenter,
/** Top right position. */
JGProgressHUDPositionTopRight,
/** Center left position. */
JGProgressHUDPositionCenterLeft,
/** Center right position. */
JGProgressHUDPositionCenterRight,
/** Bottom left position. */
JGProgressHUDPositionBottomLeft,
/** Bottom center position. */
JGProgressHUDPositionBottomCenter,
/** Bottom right position. */
JGProgressHUDPositionBottomRight
};
/**
Appearance styles of the HUD.
*/
typedef NS_ENUM(NSUInteger, JGProgressHUDStyle) {
/** Extra light HUD with dark elements. */
JGProgressHUDStyleExtraLight = 0,
/** Light HUD with dark elemets. */
JGProgressHUDStyleLight,
/** Dark HUD with light elements. */
JGProgressHUDStyleDark
};
/**
Interaction types.
*/
typedef NS_ENUM(NSUInteger, JGProgressHUDInteractionType) {
/** Block all touches. No interaction behin the HUD is possible. */
JGProgressHUDInteractionTypeBlockAllTouches = 0,
/** Block touches on the HUD view. */
JGProgressHUDInteractionTypeBlockTouchesOnHUDView,
/** Block no touches. */
JGProgressHUDInteractionTypeBlockNoTouches
};
/**
Parallax Modes.
*/
typedef NS_ENUM(NSUInteger, JGProgressHUDParallaxMode) {
/** Follows the device setting for parallax. If "Reduce Motion" is enabled, no parallax effect is added to the HUD, if "Reduce Motion" is disabled the HUD will have a parallax effect. This behaviour is only supported on iOS 8 and higher. */
JGProgressHUDParallaxModeDevice = 0,
/** Always adds a parallax effect to the HUD. Parallax is only supported on iOS 7 and higher. */
JGProgressHUDParallaxModeAlwaysOn,
/** Never adds a parallax effect to the HUD. */
JGProgressHUDParallaxModeAlwaysOff
};
#ifndef fequal
/**
Macro for safe floating point comparison (for internal use in JGProgressHUD).
*/
#define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON)
#endif