UIDeviceUtil.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // DeviceName.h
  3. //
  4. // Created by Inder Kumar Rathore on 19/01/13.
  5. // Copyright (c) 2013 Rathore. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. typedef NS_ENUM(NSUInteger, Hardware) {
  9. NOT_AVAILABLE,
  10. IPHONE_2G,
  11. IPHONE_3G,
  12. IPHONE_3GS,
  13. IPHONE_4,
  14. IPHONE_4_CDMA,
  15. IPHONE_4S,
  16. IPHONE_5,
  17. IPHONE_5_CDMA_GSM,
  18. IPHONE_5C,
  19. IPHONE_5C_CDMA_GSM,
  20. IPHONE_5S,
  21. IPHONE_5S_CDMA_GSM,
  22. IPHONE_6_PLUS,
  23. IPHONE_6,
  24. IPOD_TOUCH_1G,
  25. IPOD_TOUCH_2G,
  26. IPOD_TOUCH_3G,
  27. IPOD_TOUCH_4G,
  28. IPOD_TOUCH_5G,
  29. IPAD,
  30. IPAD_2,
  31. IPAD_2_WIFI,
  32. IPAD_2_CDMA,
  33. IPAD_3,
  34. IPAD_3G,
  35. IPAD_3_WIFI,
  36. IPAD_3_WIFI_CDMA,
  37. IPAD_4,
  38. IPAD_4_WIFI,
  39. IPAD_4_GSM_CDMA,
  40. IPAD_MINI,
  41. IPAD_MINI_WIFI,
  42. IPAD_MINI_WIFI_CDMA,
  43. IPAD_MINI_RETINA_WIFI,
  44. IPAD_MINI_RETINA_WIFI_CDMA,
  45. IPAD_MINI_3_WIFI,
  46. IPAD_MINI_3_WIFI_CELLULAR,
  47. IPAD_MINI_RETINA_WIFI_CELLULAR_CN,
  48. IPAD_AIR_WIFI,
  49. IPAD_AIR_WIFI_GSM,
  50. IPAD_AIR_WIFI_CDMA,
  51. IPAD_AIR_2_WIFI,
  52. IPAD_AIR_2_WIFI_CELLULAR,
  53. SIMULATOR
  54. };
  55. @interface UIDeviceUtil : NSObject
  56. /** This method retruns the hardware type */
  57. + (NSString*)hardwareString;
  58. /** This method returns the Hardware enum depending upon harware string */
  59. + (Hardware)hardware;
  60. /** This method returns the readable description of hardware string */
  61. + (NSString*)hardwareDescription;
  62. /** This method returns the readable simple description of hardware string */
  63. + (NSString*)hardwareSimpleDescription;
  64. /**
  65. This method returns the hardware number not actual but logically.
  66. e.g. if the hardware string is 5,1 then hardware number would be 5.1
  67. */
  68. + (float)hardwareNumber:(Hardware)hardware;
  69. /** This method returns the resolution for still image that can be received
  70. from back camera of the current device. Resolution returned for image oriented landscape right. **/
  71. + (CGSize)backCameraStillImageResolutionInPixels;
  72. @end