-
Notifications
You must be signed in to change notification settings - Fork 0
/
A10F9095-91D7-4F0D-965D-306C5A6ADE2F.codesnippet
48 lines (46 loc) · 1.43 KB
/
A10F9095-91D7-4F0D-965D-306C5A6ADE2F.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
38
39
40
41
42
43
44
45
46
47
48
<?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>hh</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>All</string>
</array>
<key>IDECodeSnippetContents</key>
<string>#if DEBUG
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(hotReload) name:@"INJECTION_BUNDLE_NOTIFICATION" object:nil];
});
#endif
}
// 热刷新UI代码,不用可以注释掉,不调用
- (void)hotReload {
[self removeAllViews:self.view];
[self viewDidLoad];
}
// 热刷新UI代码,不用可以注释掉,不调用
- (void)removeAllViews:(UIView *)view {
while (view.subviews.count) {
UIView* child = view.subviews.lastObject;
[child removeFromSuperview];
}
}</string>
<key>IDECodeSnippetIdentifier</key>
<string>A10F9095-91D7-4F0D-965D-306C5A6ADE2F</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetPlatformFamily</key>
<string>iphoneos</string>
<key>IDECodeSnippetSummary</key>
<string>hh</string>
<key>IDECodeSnippetTitle</key>
<string>hh</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>