Skip to content

Commit b059d5c

Browse files
committed
ADD: add custom GCD snippet
1 parent 11700b3 commit b059d5c

2 files changed

Lines changed: 37 additions & 2 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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_custom_dispatch</string>
7+
<key>IDECodeSnippetCompletionScopes</key>
8+
<array>
9+
<string>CodeBlock</string>
10+
</array>
11+
<key>IDECodeSnippetContents</key>
12+
<string> dispatch_queue_t urls_queue = dispatch_queue_create("com.elctech.image_queue", NULL);
13+
14+
dispatch_async(urls_queue, ^{
15+
[self getImageUrls];
16+
dispatch_async(dispatch_get_main_queue(), ^{
17+
[self downloadImages];
18+
});
19+
});
20+
21+
dispatch_release(urls_queue);</string>
22+
<key>IDECodeSnippetIdentifier</key>
23+
<string>1C071233-5D65-4101-9C7C-A43509BB57B8</string>
24+
<key>IDECodeSnippetLanguage</key>
25+
<string>Xcode.SourceCodeLanguage.Objective-C</string>
26+
<key>IDECodeSnippetSummary</key>
27+
<string>Custom dispatch queue</string>
28+
<key>IDECodeSnippetTitle</key>
29+
<string>Custom dispatch queue</string>
30+
<key>IDECodeSnippetUserSnippet</key>
31+
<true/>
32+
<key>IDECodeSnippetVersion</key>
33+
<integer>2</integer>
34+
</dict>
35+
</plist>

CodeSnippets/84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>IDECodeSnippetCompletionPrefix</key>
6-
<string>notification</string>
6+
<string>tq_notification</string>
77
<key>IDECodeSnippetCompletionScopes</key>
88
<array>
99
<string>CodeExpression</string>
@@ -28,6 +28,6 @@
2828
<key>IDECodeSnippetUserSnippet</key>
2929
<true/>
3030
<key>IDECodeSnippetVersion</key>
31-
<integer>0</integer>
31+
<integer>2</integer>
3232
</dict>
3333
</plist>

0 commit comments

Comments
 (0)