-
Notifications
You must be signed in to change notification settings - Fork 236
/
QMUI_exchangeMultipleImplementations.codesnippet
37 lines (37 loc) · 1.42 KB
/
QMUI_exchangeMultipleImplementations.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
34
35
36
37
<?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>exchangeMultipleImplementations_QMUI</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>All</string>
</array>
<key>IDECodeSnippetContents</key>
<string>+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
SEL selectors[] = {
@selector(<#selector name1#>),
@selector(<#selector name2#>)
};
for (NSUInteger index = 0; index < sizeof(selectors) / sizeof(SEL); index++) {
SEL originalSelector = selectors[index];
SEL swizzledSelector = NSSelectorFromString([@"<#new method prefix#>_" stringByAppendingString:NSStringFromSelector(originalSelector)]);
ExchangeImplementations([self class], originalSelector, swizzledSelector);
}
});
}</string>
<key>IDECodeSnippetIdentifier</key>
<string>A5AEA3D2-5AC9-4ACE-B1C4-075983619EFF</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetTitle</key>
<string>exchange multiple method implementations in +load with QMUI</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>