Skip to content

Commit 34df1e3

Browse files
committed
ADD: add shared instance snippet
1 parent 16b075a commit 34df1e3

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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_sharedInstance</string>
7+
<key>IDECodeSnippetCompletionScopes</key>
8+
<array>
9+
<string>ClassImplementation</string>
10+
</array>
11+
<key>IDECodeSnippetContents</key>
12+
<string>+(&lt;#ClassName#&gt; *) sharedInstance
13+
{
14+
static id sharedInstance = nil;
15+
if (!sharedInstance) {
16+
@synchronized(self){
17+
if (!sharedInstance) {
18+
sharedInstance = [[self alloc] init];
19+
}
20+
}
21+
}
22+
return sharedInstance;
23+
}</string>
24+
<key>IDECodeSnippetIdentifier</key>
25+
<string>45D5535E-44FA-491F-8E4B-3251A46D5372</string>
26+
<key>IDECodeSnippetLanguage</key>
27+
<string>Xcode.SourceCodeLanguage.Objective-C</string>
28+
<key>IDECodeSnippetSummary</key>
29+
<string>shared instance</string>
30+
<key>IDECodeSnippetTitle</key>
31+
<string>Shared Instance</string>
32+
<key>IDECodeSnippetUserSnippet</key>
33+
<true/>
34+
<key>IDECodeSnippetVersion</key>
35+
<integer>0</integer>
36+
</dict>
37+
</plist>

0 commit comments

Comments
 (0)