-
Notifications
You must be signed in to change notification settings - Fork 0
/
84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet
executable file
·33 lines (32 loc) · 1.31 KB
/
84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>kn_notificationSample</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>CodeExpression</string>
</array>
<key>IDECodeSnippetContents</key>
<string> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(<#methodName#>) name:kLoginNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self];
// post notification
NSDictionary * userInfo = [NSDictionary dictionaryWithObject:<##> forKey:@"code"];
[[NSNotificationCenter defaultCenter] postNotificationName:<#notification_name#> object:self userInfo:userInfo];
- (void)<#functionname#>:(NSNotification*)notification
</string>
<key>IDECodeSnippetIdentifier</key>
<string>84587A91-678A-4727-9EBA-6F9D327EF485</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetSummary</key>
<string>KN Notification sample</string>
<key>IDECodeSnippetTitle</key>
<string>KN Notification sample</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>