Personal snippets for xCode IDE
This repo contains:
- Code snippets for xCode IDE (*.codesnippet files)
- Two scripts for moving snippets between cloned repo and xCode folder where snippets are placed:
- Import: Moves snippets from existing folder to xCode;
- Export: Moves snippets from xCode to existing folder.
- Clone this repository into any folder;
- Run script Import;
- Restart xCode.
Prefix |
Description |
sl |
Creates a static let |
Example
static let <#name#> = <#value#>
Prefix |
Description |
slf |
Creates a static let of CGFloat type |
Example
static let <#name#>: CGFloat = <#value#>
Prefix |
Description |
pec |
Creates a private enum with name Constants |
Example
private enum Constants {
<#variables#>
}
Prefix |
Description |
pel |
Creates a private enum with name Layouts |
Example
private enum Layouts {
<#variables#>
}
Prefix |
Description |
lv |
Creates a lazy variable |
Example
lazy var <#name#>: <#type#> = {
<#code#>
}()
Prefix |
Description |
plv |
Creates a private lazy variable |
Example
private lazy var <#name#>: <#type#> = {
<#code#>
}()
Prefix |
Description |
cls |
Creates a class template with marks |
Example
class <#name#>: <#super class#> {
// MARK: - Variables
<#private let block#>
<#private var block#>
<#public let block#>
<#public var block#>
// MARK: - Initializers
<#initializers block#>
// MARK: - Overrides
<#override functions block#>
// MARK: - Public functions
<#public functions block#>
// MARK: - Private functions
<#private functions block#>
}