File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Author: Tang Qiao
2
+ // Date: 2012-3-2
3
+ //
4
+ // The macro is inspired from:
5
+ // http://www.yifeiyang.net/iphone-development-skills-of-the-debugging-chapter-2-save-the-log/
6
+ #ifdef DEBUG
7
+ #define debugLog (...) NSLog(__VA_ARGS__)
8
+ #define debugMethod () NSLog(@"%s", __func__)
9
+ #else
10
+ #define debugLog (...)
11
+ #define debugMethod ()
12
+ #endif
13
+
14
+ #define EMPTY_STRING @""
15
+
16
+ #define STR (key ) NSLocalizedString(key, nil)
Original file line number Diff line number Diff line change
1
+ // Author: Tang Qiao
2
+ // Date: 2012-3-2
3
+ //
4
+ // The macro is inspired from:
5
+ // http://stackoverflow.com/questions/3339722/check-iphone-ios-version
6
+
1
7
/*
2
8
* System Versioning Preprocessor Macros
3
9
*/
8
14
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO (v ) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
9
15
10
16
/*
11
- * Usage sample:
17
+ Usage sample:
12
18
13
19
if (SYSTEM_VERSION_LESS_THAN(@"4.0")) {
14
20
...
You can’t perform that action at this time.
0 commit comments