├── .gitignore
├── PULL_REQUEST_TEMPLATE.md
├── install.sh
├── CodeSnippets
├── Swift.Mark.codesnippet
├── Objc.Mark.codesnippet
├── Swift.Mark.Actions.codesnippet
├── Swift.Mark.Constants.codesnippet
├── Swift.Mark.IBActions.codesnippet
├── Swift.Mark.IBOutlets.codesnippet
├── Swift.Mark.Properties.codesnippet
├── Swift.Mark.Subviews.codesnippet
├── Swift.Mark.Nested types.codesnippet
├── Objc.Mark.Actions.codesnippet
├── Objc.Mark.Subviews.codesnippet
├── Swift.Mark.PublicMethods.codesnippet
├── Objc.Mark.IBOutelts.codesnippet
├── Swift.Mark.PrivateMethods.codesnippet
├── Swift.Mark.UITableViewCell.codesnippet
├── Objc.Mark.Properties.codesnippet
├── Swift.Mark.InternalMethods.codesnippet
├── Swift.Mark.UIViewController.codesnippet
├── Objc.Mark.NestedTypes.codesnippet
├── Any.Unit test template.codesnippet
├── Swift.Mark.NSLayoutConstraints.codesnippet
├── Swift.Mark.Public properties.codesnippet
├── Swift.Mark.ReadonlyProperties.codesnippet
├── Objc.Mark.PublicMethods.codesnippet
├── Objc.Mark.InternalMethods.codesnippet
├── Objc.Mark.PrivateMethods.codesnippet
├── Objc.Mark.PublicProperties.codesnippet
├── Objc.Mark.UIViewController.codesnippet
├── Objc.Mark.NSLayoutConstraints.codesnippet
├── Objc.Mark.ReadonlyProperties.codesnippet
├── Swift.Constants-enum.codesnippet
├── Swift.Mark.InitializationAndDeinitialization.codesnippet
├── Objc.Mark.InitializationAndDeinitialization.codesnippet
├── Swift.NSNotification name.codesnippet
├── Swift.DefaultsKey.codesnippet
├── Swift.Constraints - layout child as parent.codesnippet
├── Swift.Keyboard-detector.codesnippet
└── Swift.TableViewAdapter.codesnippet
├── LICENSE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.code-workspace
--------------------------------------------------------------------------------
/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | #### Related issue #0 ####
2 |
3 | #### Changes: ####
4 | *
5 | *
6 |
7 | #### Notes: ####
8 | *
9 | *
10 |
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | installDirectory=~/Library/Developer/Xcode/UserData
3 | mkdir -p "${installDirectory}"
4 | cp -R "CodeSnippets" "${installDirectory}"
5 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | mark
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: -
13 | IDECodeSnippetIdentifier
14 | 8051CD66-6646-4ABB-975D-433678070ADF
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark -
13 | IDECodeSnippetIdentifier
14 | 1DFF79A7-1EC0-4164-866F-D0DD48CC4072
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.Actions.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Actions
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Actions
13 | IDECodeSnippetIdentifier
14 | E91AEA52-6C1B-4DB0-B3AF-D4AFE18FB2D9
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Actions MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.Constants.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Constants
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Constants
13 | IDECodeSnippetIdentifier
14 | 19B5FE13-52D3-49E1-B64C-809E62F5F483
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Constants MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.IBActions.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.IBActions
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - IBActions
13 | IDECodeSnippetIdentifier
14 | 01C66613-3831-4DB9-9D4F-96EEEF538945
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | IBActions MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.IBOutlets.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.IBOutlets
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - IBOutlets
13 | IDECodeSnippetIdentifier
14 | 9E24F6FE-6618-48C6-B2B6-79376FDEAB32
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | IBOutlets MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.Properties.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Properties
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Properties
13 | IDECodeSnippetIdentifier
14 | A41F7A26-6620-439E-B14F-6920FCB714B9
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Properties MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.Subviews.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Subviews mark
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Subviews
13 | IDECodeSnippetIdentifier
14 | 8BE67634-11D9-47B5-8724-2F96C088EB5F
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Subviews MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.Nested types.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Nested types
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Nested types
13 | IDECodeSnippetIdentifier
14 | 63A67752-F02E-4364-966A-0227D777D9CF
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Nested types MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.Actions.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Actions
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Actions
13 | IDECodeSnippetIdentifier
14 | 97583561-2AC0-45F0-9802-3B2EFDEED666
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Actions
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.Subviews.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Subviews
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Subviews
13 | IDECodeSnippetIdentifier
14 | BACE8242-E1AA-4463-91AC-108A8D464011
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Subviews
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.PublicMethods.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Public methods
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Public methods
13 | IDECodeSnippetIdentifier
14 | 5630C993-1A88-44B3-A07D-0C8491A6BA4A
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Public methods MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.IBOutelts.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.IBOutlets
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - IBOutlets
13 | IDECodeSnippetIdentifier
14 | 397CB972-96FC-42D7-9620-9ACD9A81722C
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - IBOutlets
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.PrivateMethods.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Private methods
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Private methods
13 | IDECodeSnippetIdentifier
14 | 8019B756-5867-4995-9CD1-FE695546E731
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Private methods MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.UITableViewCell.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.UITableViewCell
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - UITableViewCell
13 | IDECodeSnippetIdentifier
14 | F92FD887-0CD9-4897-90EF-62D507D76C7A
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | UITableViewCell MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.Properties.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Properties
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Properties
13 | IDECodeSnippetIdentifier
14 | BA0EB444-F591-40AA-8774-5CEBFDB3C817
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Properties
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.InternalMethods.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Internal methods
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Internal methods
13 | IDECodeSnippetIdentifier
14 | 6C632B06-7A85-4EE0-91EC-2C208BBAF27E
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Internal methods MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.UIViewController.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.UIViewController
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - UIViewController
13 | IDECodeSnippetIdentifier
14 | 2C8AD754-858D-4862-9921-C1A261C8E5C7
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | UIViewController MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.NestedTypes.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Nested types
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Nested types
13 | IDECodeSnippetIdentifier
14 | 9B052FFD-9F4A-4FAB-A1EF-4C40B8D343B0
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Nested types
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Any.Unit test template.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | testtemplate
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // given
13 |
14 | // when
15 |
16 | // then
17 | IDECodeSnippetIdentifier
18 | 750DA0B9-FABF-465E-BD7A-2E7AEB724658
19 | IDECodeSnippetLanguage
20 | Xcode.SourceCodeLanguage.Generic
21 | IDECodeSnippetTitle
22 | Unit test case template
23 | IDECodeSnippetUserSnippet
24 |
25 | IDECodeSnippetVersion
26 | 2
27 |
28 |
29 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.NSLayoutConstraints.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.NSLayoutConstraints
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - NSLayoutConstraints
13 | IDECodeSnippetIdentifier
14 | 3A152FED-5077-473A-B94A-90663568A043
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | NSLayoutConstraints mark
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.Public properties.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Public properties mark
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Public properties
13 | IDECodeSnippetIdentifier
14 | EEB2E473-A350-421D-873D-F0167D8187EF
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Public properies MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.ReadonlyProperties.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Readonly properties
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Readonly properties
13 | IDECodeSnippetIdentifier
14 | 19B5FE13-52D3-49E1-B64C-809E62F5F483
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Readunly properties MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.PublicMethods.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Public methods
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Public methods
13 | IDECodeSnippetIdentifier
14 | B33BF2FD-1CE8-4B48-B2D9-67542B1896A4
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Public methods
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.InternalMethods.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Internal methods
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Internal methods
13 | IDECodeSnippetIdentifier
14 | 9F70DB55-AD98-4C73-A493-D89CEB916E1B
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Internal methods
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.PrivateMethods.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Private methods
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Private methods
13 | IDECodeSnippetIdentifier
14 | 301B4121-ABEE-4768-9624-557F1C758449
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Private methods
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.PublicProperties.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Public properties
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Public properties
13 | IDECodeSnippetIdentifier
14 | 5746E56D-C8E0-4725-90CE-9D28D0B46D56
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Public properties
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.UIViewController.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.UIViewController
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - UIViewController
13 | IDECodeSnippetIdentifier
14 | 0ECAD968-37BF-422E-A16D-EA7DDFC39462
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - UIViewController
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.NSLayoutConstraints.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.NSLayoutConstraints
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - NSLayoutConstraints
13 | IDECodeSnippetIdentifier
14 | 050BC3F4-D72A-476A-9084-FC4478F8A8D3
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - NSLayoutConstraints
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.ReadonlyProperties.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Readonly properties
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Readonly properties
13 | IDECodeSnippetIdentifier
14 | 3FD75B95-4E26-487C-A77A-1AA4364A1B30
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Readonly properties
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Constants-enum.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | Constants enum
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Nested types
13 |
14 | private enum Constants {
15 |
16 | }
17 | IDECodeSnippetIdentifier
18 | B22E0975-5052-4DD3-B01E-3FDF9F037B13
19 | IDECodeSnippetLanguage
20 | Xcode.SourceCodeLanguage.Swift
21 | IDECodeSnippetTitle
22 | Constants enum
23 | IDECodeSnippetUserSnippet
24 |
25 | IDECodeSnippetVersion
26 | 2
27 |
28 |
29 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Mark.InitializationAndDeinitialization.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Initialization and deinitialization
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | // MARK: - Initialization and deinitialization
13 | IDECodeSnippetIdentifier
14 | 8B94553C-175D-42FB-BB94-B4E9D8CE3810
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Initialization and deinitialization MARK
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 2
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Objc.Mark.InitializationAndDeinitialization.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.Initialization and deinitialization
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | #pragma mark - Initialization and deinitialization
13 | IDECodeSnippetIdentifier
14 | 9684362F-8250-4FE8-B2BF-E660EFFD3CE4
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Objective-C
17 | IDECodeSnippetTitle
18 | Objective C mark - Initialization and deinitialization
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.NSNotification name.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | MARK.NSNotification name
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | static let <#notificationName#> = NSNotification.Name("<#projectName#>.notifications.<#notificationName#>")
13 | IDECodeSnippetIdentifier
14 | EFD03CB6-B661-4D10-9B33-73EAE0E09115
15 | IDECodeSnippetLanguage
16 | Xcode.SourceCodeLanguage.Swift
17 | IDECodeSnippetTitle
18 | Add new NSNotification name
19 | IDECodeSnippetUserSnippet
20 |
21 | IDECodeSnippetVersion
22 | 0
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.DefaultsKey.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | Defaults Key
7 | IDECodeSnippetCompletionScopes
8 |
9 | ClassImplementation
10 |
11 | IDECodeSnippetContents
12 | var <#defaultsKey#>: <#Type#> {
13 | get { return <#typeof#>(forKey: #function) }
14 | set { set(newValue, forKey: #function) }
15 | }
16 | IDECodeSnippetIdentifier
17 | 907DF6A8-979C-436C-B2F3-A7065A2A57A6
18 | IDECodeSnippetLanguage
19 | Xcode.SourceCodeLanguage.Swift
20 | IDECodeSnippetTitle
21 | Defaults Key
22 | IDECodeSnippetUserSnippet
23 |
24 | IDECodeSnippetVersion
25 | 0
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Ivan Smetanin
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Constraints - layout child as parent.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | Constraints - layout child as parent
7 | IDECodeSnippetCompletionScopes
8 |
9 | CodeBlock
10 |
11 | IDECodeSnippetContents
12 | <#childView#>.translatesAutoresizingMaskIntoConstraints = false
13 |
14 | NSLayoutConstraint.activate([
15 | <#childView#>.topAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.topAnchor, constant: 0),
16 | <#childView#>.bottomAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.bottomAnchor, constant: 0),
17 | <#childView#>.leadingAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.leadingAnchor, constant: 0),
18 | <#childView#>.trailingAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.trailingAnchor, constant: 0)
19 | ])
20 | IDECodeSnippetIdentifier
21 | AB7AB587-40D3-4B26-BF65-33DAEB5D19D2
22 | IDECodeSnippetLanguage
23 | Xcode.SourceCodeLanguage.Swift
24 | IDECodeSnippetTitle
25 | Constraints - layout child as parent
26 | IDECodeSnippetUserSnippet
27 |
28 | IDECodeSnippetVersion
29 | 2
30 |
31 |
32 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.Keyboard-detector.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | Keyboard detector
7 | IDECodeSnippetCompletionScopes
8 |
9 | All
10 |
11 | IDECodeSnippetContents
12 | private func addKeyboardObservers() {
13 | NotificationCenter.default.addObserver(self,
14 | selector: #selector(keyboardWillShow),
15 | name: UIResponder.keyboardWillShowNotification,
16 | object: nil)
17 | NotificationCenter.default.addObserver(self,
18 | selector: #selector(keyboardWillHide),
19 | name: UIResponder.keyboardWillHideNotification,
20 | object: nil)
21 | }
22 |
23 | @objc
24 | private func keyboardWillShow(notification: NSNotification) {
25 | guard
26 | let frame = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue
27 | else {
28 | return
29 | }
30 | }
31 |
32 | @objc
33 | private func keyboardWillHide() {
34 |
35 | }
36 | IDECodeSnippetIdentifier
37 | E0D59407-8BBD-4C7D-A1E2-8BEFC1382739
38 | IDECodeSnippetLanguage
39 | Xcode.SourceCodeLanguage.Swift
40 | IDECodeSnippetTitle
41 | Keyboard detector
42 | IDECodeSnippetUserSnippet
43 |
44 | IDECodeSnippetVersion
45 | 2
46 |
47 |
48 |
--------------------------------------------------------------------------------
/CodeSnippets/Swift.TableViewAdapter.codesnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDECodeSnippetCompletionPrefix
6 | TableViewAdapter
7 | IDECodeSnippetCompletionScopes
8 |
9 | TopLevel
10 |
11 | IDECodeSnippetContents
12 | import UIKit
13 |
14 | protocol <#Your#>TableViewAdapterOutput {
15 | }
16 |
17 | final class <#Your#>TableViewAdapter: NSObject {
18 | // MARK: - Properties
19 |
20 | private let output: <#Your#>TableViewAdapterOutput
21 |
22 | private var items: [String]
23 | private var tableView: UITableView
24 |
25 | // MARK: - Initialization and deinitialization
26 |
27 | init(tableView: UITableView, output: <#Your#>TableViewAdapterOutput) {
28 | self.output = output
29 | self.tableView = tableView
30 | self.items = []
31 | super.init()
32 | setupTable()
33 | }
34 |
35 | // MARK: - Internal methods
36 |
37 | func configure(with items: [String]) {
38 | self.items = items
39 | tableView.reloadData()
40 | }
41 |
42 | // MARK: - Private methods
43 |
44 | private func setupTable() {
45 | tableView.delegate = self
46 | tableView.dataSource = self
47 | tableView.register(
48 | UINib(nibName: String(describing: <#Your#>TableViewCell.self), bundle: nil),
49 | forCellReuseIdentifier: String(describing: <#Your#>TableViewCell.self)
50 | )
51 | }
52 | }
53 |
54 | // MARK: - UITableViewDataSource
55 |
56 | extension <#Your#>TableViewAdapter: UITableViewDataSource {
57 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
58 | return items.count
59 | }
60 |
61 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
62 | let cell = tableView.dequeueReusableCell(
63 | withIdentifier: String(describing: <#Your#>TableViewCell.self),
64 | for: indexPath
65 | ) as? TableViewCell
66 | cell?.backgroundColor = .red
67 | return cell ?? <#Your#>UITableViewCell()
68 | }
69 | }
70 |
71 | // MARK: - UITableViewDelegate
72 |
73 | extension <#Your#>TableViewAdapter: UITableViewDelegate {
74 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
75 | tableView.deselectRow(at: indexPath, animated: true)
76 | }
77 | }
78 | IDECodeSnippetIdentifier
79 | A1B0978E-94D6-4B90-9D4E-3AFD1111621D
80 | IDECodeSnippetLanguage
81 | Xcode.SourceCodeLanguage.Swift
82 | IDECodeSnippetSummary
83 |
84 | IDECodeSnippetTitle
85 | Table view adapter
86 | IDECodeSnippetUserSnippet
87 |
88 | IDECodeSnippetVersion
89 | 2
90 |
91 |
92 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](http://makeapullrequest.com)
2 |
3 | # XcodeCodeSnippets
4 |
5 | A set of snippets for Xcode.
6 |
7 | ## Requirements
8 |
9 | Xcode 7.3.1 or later.
10 |
11 | ## Installation
12 |
13 | To install or update the snippets you need:
14 |
15 | * Quit Xcode
16 | * On the command line:
17 |
18 | ```
19 | cd ~/Downloads
20 | git clone https://github.com/ismetanin/XcodeCodeSnippets
21 | mkdir -p $HOME/Library/Developer/Xcode/UserData/CodeSnippets
22 | cp XcodeCodeSnippets/CodeSnippets/* $HOME/Library/Developer/Xcode/UserData/CodeSnippets
23 | rm -rf XcodeCodeSnippets
24 | ```
25 |
26 | Or if you have a cloned repository:
27 |
28 | * On the command line, cd into the directory with snippets and write `sh ./install.sh`
29 |
30 | ## List of snippets
31 |
32 | ### MARKs
33 |
34 | There are MARKs for Swift and Objective-C. For Swift there is prefix before each `// MARK: -` and for Objective-C prefix is `#pragma mark -`.
35 |
36 | Shortcuts are equal to snippet body for example for `// MARK: - Properties` shortcut is `Properties`.
37 |
38 |
39 | Available MARKs
40 |
41 |
42 | |Snippet|
43 | |---|
44 | |Just empty mark (`// MARK: - ` or `#pragma mark - `) |
45 | |`Nested types` |
46 | |`Constants` |
47 | |`Subviews` |
48 | |`NSLayoutConstraints` |
49 | |`Properties` |
50 | |`Public properties` |
51 | |`Readonly properties` |
52 | |`IBOutlets` |
53 | |`Initialization and deinitialization` |
54 | |`UITableViewCell` |
55 | |`UIViewController` |
56 | |`Actions` |
57 | |`IBActions` |
58 | |`Public methods` |
59 | |`Internal methods` |
60 | |`Private methods` |
61 |
62 |
63 | ### Code
64 |
65 | * A template for creating TableViewAdapter, **shortcut:** `Table View Adapter`
66 |
67 | Code
68 |
69 |
70 | ```swift
71 | import UIKit
72 |
73 | protocol <#Your#>TableViewAdapterOutput {
74 | }
75 |
76 | final class <#Your#>TableViewAdapter: NSObject {
77 | // MARK: - Properties
78 |
79 | private let output: <#Your#>TableViewAdapterOutput
80 |
81 | private var items: [String]
82 | private var tableView: UITableView
83 |
84 | // MARK: - Initialization and deinitialization
85 |
86 | init(tableView: UITableView, output: <#Your#>TableViewAdapterOutput) {
87 | self.output = output
88 | self.tableView = tableView
89 | self.items = []
90 | super.init()
91 | setupTable()
92 | }
93 |
94 | // MARK: - Internal methods
95 |
96 | func configure(with items: [String]) {
97 | self.items = items
98 | tableView.reloadData()
99 | }
100 |
101 | // MARK: - Private methods
102 |
103 | private func setupTable() {
104 | tableView.delegate = self
105 | tableView.dataSource = self
106 | tableView.register(
107 | UINib(nibName: String(describing: <#Your#>TableViewCell.self), bundle: nil),
108 | forCellReuseIdentifier: String(describing: <#Your#>TableViewCell.self)
109 | )
110 | }
111 | }
112 |
113 | // MARK: - UITableViewDataSource
114 |
115 | extension <#Your#>TableViewAdapter: UITableViewDataSource {
116 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
117 | return items.count
118 | }
119 |
120 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
121 | let cell = tableView.dequeueReusableCell(
122 | withIdentifier: String(describing: <#Your#>TableViewCell.self),
123 | for: indexPath
124 | ) as? TableViewCell
125 | cell?.backgroundColor = .red
126 | return cell ?? <#Your#>UITableViewCell()
127 | }
128 | }
129 |
130 | // MARK: - UITableViewDelegate
131 |
132 | extension <#Your#>TableViewAdapter: UITableViewDelegate {
133 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
134 | tableView.deselectRow(at: indexPath, animated: true)
135 | }
136 | }
137 | ```
138 |
139 |
140 | * A code block for creating user property in UserDefaults extension, **shortcut:** `Defaults Key`
141 |
142 | Code
143 |
144 |
145 | ```swift
146 | var <#defaultsKey#>: <#Type#> {
147 | get { return <#typeof#>(forKey: #function) }
148 | set { set(newValue, forKey: #function) }
149 | }
150 | ```
151 |
152 |
153 | * A code block for layouting child view anchors equal to the parent view anchors, **shortcut:** `Constraints - layout child as parent`
154 |
155 | Code
156 |
157 |
158 | ```swift
159 | <#childView#>.translatesAutoresizingMaskIntoConstraints = false
160 |
161 | NSLayoutConstraint.activate([
162 | <#childView#>.topAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.topAnchor, constant: 0),
163 | <#childView#>.bottomAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.bottomAnchor, constant: 0),
164 | <#childView#>.leadingAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.leadingAnchor, constant: 0),
165 | <#childView#>.trailingAnchor.constraint(equalTo: <#parentView#>.safeAreaLayoutGuide.trailingAnchor, constant: 0)
166 | ])
167 | ```
168 |
169 |
170 |
171 | * A code block for user property creating in NSNotification.Name extension, **shortcut:** `NSNotification Name`
172 |
173 | Code
174 |
175 |
176 | ```swift
177 | static let <#notificationName#> = NSNotification.Name("<#projectName#>.notifications.<#notificationName#>")
178 | ```
179 |
180 |
181 |
182 | * A code block for creating template comments for unit test, **shortcut:** `testtemplate`
183 |
184 | Code
185 |
186 |
187 | ```swift
188 | // given
189 |
190 | // when
191 |
192 | // then
193 |
194 | ```
195 |
196 |
197 |
198 | * A code block for creating template constants enum, **shortcut:** `Constants enum`
199 |
200 | Code
201 |
202 |
203 | ```swift
204 | // MARK: - Nested types
205 |
206 | private enum Constants {
207 |
208 | }
209 | ```
210 |
211 |
212 |
213 | * A code block for creating keyboard notifications detector, **shortcut:** `Keyboard detector`
214 |
215 | Code
216 |
217 |
218 | ```swift
219 | func addKeyboardObservers() {
220 | NotificationCenter.default.addObserver(self,
221 | selector: #selector(keyboardWillShow),
222 | name: UIResponder.keyboardWillShowNotification,
223 | object: nil)
224 | NotificationCenter.default.addObserver(self,
225 | selector: #selector(keyboardWillHide),
226 | name: UIResponder.keyboardWillHideNotification,
227 | object: nil)
228 | }
229 |
230 | @objc
231 | func keyboardWillShow(notification: NSNotification) {
232 | guard
233 | let frame = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue
234 | else {
235 | return
236 | }
237 | }
238 |
239 | @objc
240 | func keyboardWillHide() {
241 |
242 | }
243 | ```
244 |
245 |
246 |
247 | ### Author
248 |
249 | Ivan Smetanin, smetanin23@yandex.ru
250 |
251 | ### License
252 |
253 | XcodeCodeSnippets is available under the MIT license. See the [LICENSE](https://github.com/ismetanin/XcodeCodeSnippets/blob/master/LICENSE) file for more info.
254 |
--------------------------------------------------------------------------------