RSS

(root)/iphone/common : 63 : source/NSObject_DeviceDetection.h

To get this branch, use:
bzr branch /browse/iphone/common

« back to all changes in this revision

Viewing changes to source/NSObject_DeviceDetection.h

Dömötör Gulyás
2010-04-12 09:25:47
Revision ID: dognotdog@gmail.com-20100412072547-sx17cmyssarjtxcu
adds device detection category to NSObject

Show diffs side-by-side

added added

removed removed

 
1
//
 
2
//  NSObject_DeviceDetection.h
 
3
//  Jigs
 
4
//
 
5
//  Created by döme on 12.04.2010.
 
6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
 
7
//
 
8
 
 
9
#import <Foundation/Foundation.h>
 
10
 
 
11
#import <Foundation/Foundation.h>
 
12
#import <UIKit/UIKit.h>
 
13
 
 
14
#ifndef UI_USER_INTERFACE_IDIOM()
 
15
        #define UIUserInterfaceIdiomPhone       1
 
16
        #define UIUserInterfaceIdiomPad         0
 
17
        
 
18
        #define UI_USER_INTERFACE_IDIOM() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] ? [[UIDevice currentDevice] userInterfaceIdiom] : UIUserInterfaceIdiomPhone)
 
19
#endif
 
20
 
 
21
@interface NSObject (DeviceDetection)
 
22
 
 
23
- (BOOL) isItAPad;
 
24
- (BOOL) isItAPhone;
 
25
 
 
26
@end

Loggerhead 1.17 is a web-based interface for Bazaar branches