bzr branch
/browse/iphone/common
| Line | Revision | Contents |
| 1 | 63 | // |
| 2 | // NSObject_DeviceDetection.m |
|
| 3 | // Jigs |
|
| 4 | // |
|
| 5 | // Created by döme on 12.04.2010. |
|
| 6 | // Copyright 2010 __MyCompanyName__. All rights reserved. |
|
| 7 | // |
|
| 8 | ||
| 9 | #import "NSObject_DeviceDetection.h" |
|
| 10 | ||
| 11 | ||
| 12 | @implementation NSObject (DeviceDetection) |
|
| 13 | ||
| 14 | - (BOOL) isItAPad |
|
| 15 | { |
|
| 16 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 |
|
| 17 | return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad; |
|
| 18 | #else |
|
| 19 | return NO; |
|
| 20 | #endif |
|
| 21 | } |
|
| 22 | ||
| 23 | - (BOOL) isItAPhone |
|
| 24 | { |
|
| 25 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 |
|
| 26 | return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone; |
|
| 27 | #else |
|
| 28 | return YES; |
|
| 29 | #endif |
|
| 30 | } |
|
| 31 | ||
| 32 | @end |
|
| 33 |
Loggerhead 1.17 is a web-based interface for Bazaar branches