forked from dogo/SCLAlertView
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCLMacros.h
More file actions
27 lines (22 loc) · 1.26 KB
/
SCLMacros.h
File metadata and controls
27 lines (22 loc) · 1.26 KB
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
//
// SCLMacros.h
// SCLAlertView
//
// Created by Diogo Autilio on 10/03/15.
// Copyright (c) 2015-2017 AnyKey Entertainment. All rights reserved.
//
#ifndef SCL_MACROS_H
#define SCL_MACROS_H
#define UIColorFromHEX(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define DEGREES_TO_RADIANS(degrees) ((M_PI * degrees)/ 180)
#define TIMER_STEP .01
#define START_DEGREE_OFFSET -90
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#endif