diff --git a/log_error.m b/log_error.m new file mode 100644 index 0000000..0e41095 --- /dev/null +++ b/log_error.m @@ -0,0 +1,11 @@ +// log error +// log error +// +// IDECodeSnippetCompletionPrefix: dde +// IDECodeSnippetCompletionScopes: [CodeBlock] +// IDECodeSnippetIdentifier: 11BB3538-E850-48CA-AAD7-C60C46CFFD52 +// IDECodeSnippetLanguage: Xcode.SourceCodeLanguage.C +// IDECodeSnippetUserSnippet: 1 +// IDECodeSnippetVersion: 1 + +DDLogError(@"%s: error=%@", __FUNCTION__, error.localizedDescription); diff --git a/log_header.m b/log_header.m new file mode 100644 index 0000000..fb90f93 --- /dev/null +++ b/log_header.m @@ -0,0 +1,17 @@ +// log header +// log header +// +// IDECodeSnippetCompletionPrefix: ddh +// IDECodeSnippetCompletionScopes: [CodeBlock] +// IDECodeSnippetIdentifier: 11BB3538-E850-48CA-AAD7-C60C46CFFD51 +// IDECodeSnippetLanguage: Xcode.SourceCodeLanguage.C +// IDECodeSnippetUserSnippet: 1 +// IDECodeSnippetVersion: 1 + +#import + +#ifdef DEBUG +static const int ddLogLevel = DDLogLevelInfo; +#else +static const int ddLogLevel = DDLogLevelError; +#endif diff --git a/log_warning.m b/log_warning.m new file mode 100644 index 0000000..14cebc6 --- /dev/null +++ b/log_warning.m @@ -0,0 +1,11 @@ +// log warning +// log warning +// +// IDECodeSnippetCompletionPrefix: ddw +// IDECodeSnippetCompletionScopes: [CodeBlock] +// IDECodeSnippetIdentifier: 11BB3538-E850-48CA-AAD7-C60C46CFFD53 +// IDECodeSnippetLanguage: Xcode.SourceCodeLanguage.C +// IDECodeSnippetUserSnippet: 1 +// IDECodeSnippetVersion: 1 + +DDLogWarning(@"%s: error=%@", __FUNCTION__, error.localizedDescription); diff --git a/strong_self.m b/strong_self.m new file mode 100644 index 0000000..72e7223 --- /dev/null +++ b/strong_self.m @@ -0,0 +1,10 @@ +// strong self +// Strong self reference +// +// IDECodeSnippetCompletionPrefix: strongSelf +// IDECodeSnippetCompletionScopes: [CodeBlock] +// IDECodeSnippetIdentifier: 717F5611-AC63-43D6-BB9A-4F68F1551103 +// IDECodeSnippetLanguage: Xcode.SourceCodeLanguage.Objective-C +// IDECodeSnippetUserSnippet: 1 +// IDECodeSnippetVersion: 2 +typeof(weakSelf) strongSelf = weakSelf;