-
Notifications
You must be signed in to change notification settings - Fork 0
/
CB1439CF-DDC2-47B9-8ED7-BA4BC487286D.codesnippet
42 lines (37 loc) · 1.3 KB
/
CB1439CF-DDC2-47B9-8ED7-BA4BC487286D.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
<?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>hideKeyboard</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>ClassImplementation</string>
</array>
<key>IDECodeSnippetContents</key>
<string>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
NSArray *items = [NSArray arrayWithObjects:self.item1, self.item2, nil];
for(id item in items)
{
UITextField *field = (UITextField*)item;
if ([field isFirstResponder] && [touch view] != field) {
[field resignFirstResponder];
}
}
[super touchesBegan:touches withEvent:event];
}</string>
<key>IDECodeSnippetIdentifier</key>
<string>CB1439CF-DDC2-47B9-8ED7-BA4BC487286D</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetSummary</key>
<string>Hides keyboard on view</string>
<key>IDECodeSnippetTitle</key>
<string>Hide Keyboard</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>