forked from sonsongithub/PopupView
/
PopupViewTest_Prefix.pch
37 lines (31 loc) · 1.43 KB
/
PopupViewTest_Prefix.pch
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
//
// Prefix header for all source files of the 'PopupViewTest' target in the 'PopupViewTest' project
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
#if TARGET_IPHONE_SIMULATOR
#import <objc/objc-runtime.h>
#else
#import <objc/runtime.h>
#endif
#ifdef _DEBUG
#define DNSLog(...); NSLog(__VA_ARGS__);
#define DNSLogMethod NSLog(@"[%s] %@", class_getName([self class]), NSStringFromSelector(_cmd));
#define DNSLogPoint(p) NSLog(@"%f,%f", p.x, p.y);
#define DNSLogSize(p) NSLog(@"%f,%f", p.width, p.height);
#define DNSLogRect(p) NSLog(@"%f,%f %f,%f", p.origin.x, p.origin.y, p.size.width, p.size.height);
CFAbsoluteTime startTime;
#define D_START startTime=CFAbsoluteTimeGetCurrent();
#define D_END DNSLog(@"[%s] %@ %f seconds", class_getName([self class]), NSStringFromSelector(_cmd), CFAbsoluteTimeGetCurrent() - startTime );
#else
#define DNSLog(...); // NSLog(__VA_ARGS__);
#define DNSLogMethod // NSLog(@"[%s] %@", class_getName([self class]), NSStringFromSelector(_cmd) );
#define DNSLogPoint(p) // NSLog(@"%f,%f", p.x, p.y);
#define DNSLogSize(p) // NSLog(@"%f,%f", p.width, p.height);
#define DNSLogRect(p) // NSLog(@"%f,%f %f,%f", p.origin.x, p.origin.y, p.size.width, p.size.height);
#define D_START // CFAbsoluteTime startTime=CFAbsoluteTimeGetCurrent();
#define D_END // DNSLog(@"New %f seconds", CFAbsoluteTimeGetCurrent() - startTime );
#endif
#define SAFE_FREE(p) { if(p) { free(p); (p)=NULL; } }