File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+
17/*
28 * System Versioning Preprocessor Macros
39 */
814#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO (v ) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
915
1016/*
11- * Usage sample:
17+ Usage sample:
1218
1319if (SYSTEM_VERSION_LESS_THAN(@"4.0")) {
1420 ...
You can’t perform that action at this time.
0 commit comments