forked from InderKumarRathore/DeviceUtil
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUIDeviceUtil.h
More file actions
86 lines (69 loc) · 1.77 KB
/
UIDeviceUtil.h
File metadata and controls
86 lines (69 loc) · 1.77 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
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
77
78
79
80
81
82
83
84
85
86
//
// DeviceName.h
//
// Created by Inder Kumar Rathore on 19/01/13.
// Copyright (c) 2013 Rathore. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, Hardware) {
NOT_AVAILABLE,
IPHONE_2G,
IPHONE_3G,
IPHONE_3GS,
IPHONE_4,
IPHONE_4_CDMA,
IPHONE_4S,
IPHONE_5,
IPHONE_5_CDMA_GSM,
IPHONE_5C,
IPHONE_5C_CDMA_GSM,
IPHONE_5S,
IPHONE_5S_CDMA_GSM,
IPHONE_6_PLUS,
IPHONE_6,
IPOD_TOUCH_1G,
IPOD_TOUCH_2G,
IPOD_TOUCH_3G,
IPOD_TOUCH_4G,
IPOD_TOUCH_5G,
IPAD,
IPAD_2,
IPAD_2_WIFI,
IPAD_2_CDMA,
IPAD_3,
IPAD_3G,
IPAD_3_WIFI,
IPAD_3_WIFI_CDMA,
IPAD_4,
IPAD_4_WIFI,
IPAD_4_GSM_CDMA,
IPAD_MINI,
IPAD_MINI_WIFI,
IPAD_MINI_WIFI_CDMA,
IPAD_MINI_RETINA_WIFI,
IPAD_MINI_RETINA_WIFI_CDMA,
IPAD_MINI_3_WIFI,
IPAD_MINI_3_WIFI_CELLULAR,
IPAD_MINI_RETINA_WIFI_CELLULAR_CN,
IPAD_AIR_WIFI,
IPAD_AIR_WIFI_GSM,
IPAD_AIR_WIFI_CDMA,
IPAD_AIR_2_WIFI,
IPAD_AIR_2_WIFI_CELLULAR,
SIMULATOR
};
@interface UIDeviceUtil : NSObject
/** This method retruns the hardware type */
+ (NSString*)hardwareString;
/** This method returns the Hardware enum depending upon harware string */
+ (Hardware)hardware;
/** This method returns the readable description of hardware string */
+ (NSString*)hardwareDescription;
/** This method returs the readable description without identifier (GSM, CDMA, GLOBAL) */
+ (NSString *)hardwareSimpleDescription;
/** This method returns YES if the current device is better than the hardware passed */
+ (BOOL)isCurrentDeviceHardwareBetterThan:(Hardware)hardware;
/** This method returns the resolution for still image that can be received
from back camera of the current device. Resolution returned for image oriented landscape right. **/
+ (CGSize)backCameraStillImageResolutionInPixels;
@end