|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 3 | +<plist version="1.0"> |
| 4 | +<dict> |
| 5 | + <key>IDECodeSnippetCompletionPrefix</key> |
| 6 | + <string>tq_macro_utils</string> |
| 7 | + <key>IDECodeSnippetCompletionScopes</key> |
| 8 | + <array> |
| 9 | + <string>TopLevel</string> |
| 10 | + </array> |
| 11 | + <key>IDECodeSnippetContents</key> |
| 12 | + <string>#ifdef DEBUG |
| 13 | +#define debugLog(...) NSLog(__VA_ARGS__) |
| 14 | +#define debugMethod() NSLog(@"%s", __func__) |
| 15 | +#else |
| 16 | +#define debugLog(...) |
| 17 | +#define debugMethod() |
| 18 | +#endif |
| 19 | + |
| 20 | +#define EMPTY_STRING @"" |
| 21 | + |
| 22 | +#define STR(key) NSLocalizedString(key, nil) |
| 23 | + |
| 24 | +#define PATH_OF_APP_HOME NSHomeDirectory() |
| 25 | +#define PATH_OF_TEMP NSTemporaryDirectory() |
| 26 | +#define PATH_OF_DOCUMENT [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] |
| 27 | + |
| 28 | +// UIConstants provides contants variables for UI control. |
| 29 | +#define UI_NAVIGATION_BAR_HEIGHT 44 |
| 30 | +#define UI_TAB_BAR_HEIGHT 49 |
| 31 | +#define UI_STATUS_BAR_HEIGHT 20 |
| 32 | +#define UI_SCREEN_WIDTH 320 |
| 33 | +#define UI_SCREEN_HEIGHT 480 |
| 34 | + |
| 35 | +#define UI_LABEL_LENGTH 200 |
| 36 | +#define UI_LABEL_HEIGHT 15 |
| 37 | +#define UI_LABEL_FONT_SIZE 12 |
| 38 | +#define UI_LABEL_FONT [UIFont systemFontOfSize:UI_LABEL_FONT_SIZE] |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +/* |
| 43 | + * System Versioning Preprocessor Macros |
| 44 | + */ |
| 45 | +#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) |
| 46 | +#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) |
| 47 | +#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) |
| 48 | +#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) |
| 49 | +#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
| 50 | + |
| 51 | +/* |
| 52 | + Usage sample: |
| 53 | + |
| 54 | + if (SYSTEM_VERSION_LESS_THAN(@"4.0")) { |
| 55 | + ... |
| 56 | + } |
| 57 | + |
| 58 | + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"3.1.1")) { |
| 59 | + ... |
| 60 | + } |
| 61 | + |
| 62 | + */</string> |
| 63 | + <key>IDECodeSnippetIdentifier</key> |
| 64 | + <string>20888CE5-13E0-4B11-9BE3-4EEEB93DB277</string> |
| 65 | + <key>IDECodeSnippetLanguage</key> |
| 66 | + <string>Xcode.SourceCodeLanguage.Objective-C</string> |
| 67 | + <key>IDECodeSnippetSummary</key> |
| 68 | + <string>Macro Utils</string> |
| 69 | + <key>IDECodeSnippetTitle</key> |
| 70 | + <string>Macro Utils</string> |
| 71 | + <key>IDECodeSnippetUserSnippet</key> |
| 72 | + <true/> |
| 73 | + <key>IDECodeSnippetVersion</key> |
| 74 | + <integer>0</integer> |
| 75 | +</dict> |
| 76 | +</plist> |
0 commit comments