mirror of
https://github.com/wnagrodzki/XcodeToolkit.git
synced 2025-05-03 19:41:32 +02:00
Add MVP snippets
This commit is contained in:
parent
bde6c6d82d
commit
37f0802215
3 changed files with 138 additions and 0 deletions
36
snippets/BB46AFF0-71CA-44B3-981C-AECEE66ACBA3.codesnippet
Normal file
36
snippets/BB46AFF0-71CA-44B3-981C-AECEE66ACBA3.codesnippet
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?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>mvpv</string>
|
||||
<key>IDECodeSnippetCompletionScopes</key>
|
||||
<array>
|
||||
<string>TopLevel</string>
|
||||
<string>All</string>
|
||||
</array>
|
||||
<key>IDECodeSnippetContents</key>
|
||||
<string>final class <#T##Name###>View: UIView {
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
}</string>
|
||||
<key>IDECodeSnippetIdentifier</key>
|
||||
<string>BB46AFF0-71CA-44B3-981C-AECEE66ACBA3</string>
|
||||
<key>IDECodeSnippetLanguage</key>
|
||||
<string>Xcode.SourceCodeLanguage.Swift</string>
|
||||
<key>IDECodeSnippetSummary</key>
|
||||
<string></string>
|
||||
<key>IDECodeSnippetTitle</key>
|
||||
<string>MVP View</string>
|
||||
<key>IDECodeSnippetUserSnippet</key>
|
||||
<true/>
|
||||
<key>IDECodeSnippetVersion</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</plist>
|
44
snippets/DAC161C7-E876-4103-ADB1-5412D24DC03F.codesnippet
Normal file
44
snippets/DAC161C7-E876-4103-ADB1-5412D24DC03F.codesnippet
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?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>mvpp</string>
|
||||
<key>IDECodeSnippetCompletionScopes</key>
|
||||
<array>
|
||||
<string>All</string>
|
||||
<string>TopLevel</string>
|
||||
</array>
|
||||
<key>IDECodeSnippetContents</key>
|
||||
<string>protocol <#T##Name###>Presenter: AnyObject {
|
||||
|
||||
var userInterface: <#T##Name###>UserInterface? { get set }
|
||||
|
||||
func userInterfaceDidLoad()
|
||||
}
|
||||
|
||||
final class <#T##Name###>PresenterImpl {
|
||||
|
||||
weak var userInterface: <#T##Name###>UserInterface?
|
||||
}
|
||||
|
||||
extension <#T##Name###>PresenterImpl: <#T##Name###>Presenter {
|
||||
|
||||
func userInterfaceDidLoad() {
|
||||
|
||||
}
|
||||
}</string>
|
||||
<key>IDECodeSnippetIdentifier</key>
|
||||
<string>DAC161C7-E876-4103-ADB1-5412D24DC03F</string>
|
||||
<key>IDECodeSnippetLanguage</key>
|
||||
<string>Xcode.SourceCodeLanguage.Swift</string>
|
||||
<key>IDECodeSnippetSummary</key>
|
||||
<string></string>
|
||||
<key>IDECodeSnippetTitle</key>
|
||||
<string>MVP Presenter</string>
|
||||
<key>IDECodeSnippetUserSnippet</key>
|
||||
<true/>
|
||||
<key>IDECodeSnippetVersion</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</plist>
|
58
snippets/E6B2529B-7AE2-4347-8592-1AE156EB3B22.codesnippet
Normal file
58
snippets/E6B2529B-7AE2-4347-8592-1AE156EB3B22.codesnippet
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?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>mvpvc</string>
|
||||
<key>IDECodeSnippetCompletionScopes</key>
|
||||
<array>
|
||||
<string>All</string>
|
||||
<string>TopLevel</string>
|
||||
</array>
|
||||
<key>IDECodeSnippetContents</key>
|
||||
<string>protocol <#T##Name###>UserInterface: AnyObject {
|
||||
|
||||
}
|
||||
|
||||
final class <#T##Name###>ViewController: UIViewController {
|
||||
|
||||
private let presenter: <#T##Name###>Presenter
|
||||
private var <#T##name###>View: <#T##Name###>View!
|
||||
|
||||
init(presenter: <#T##Name###>Presenter) {
|
||||
self.presenter = presenter
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
presenter.userInterface = self
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
<#T##name###>View = <#T##Name###>View()
|
||||
view.addSubview(<#T##name###>View, withEdgeInsets: .zero)
|
||||
|
||||
presenter.userInterfaceDidLoad()
|
||||
}
|
||||
}
|
||||
|
||||
extension <#T##Name###>ViewController: <#T##Name###>UserInterface {
|
||||
|
||||
}
|
||||
</string>
|
||||
<key>IDECodeSnippetIdentifier</key>
|
||||
<string>E6B2529B-7AE2-4347-8592-1AE156EB3B22</string>
|
||||
<key>IDECodeSnippetLanguage</key>
|
||||
<string>Xcode.SourceCodeLanguage.Swift</string>
|
||||
<key>IDECodeSnippetSummary</key>
|
||||
<string></string>
|
||||
<key>IDECodeSnippetTitle</key>
|
||||
<string>MVP View Controller</string>
|
||||
<key>IDECodeSnippetUserSnippet</key>
|
||||
<true/>
|
||||
<key>IDECodeSnippetVersion</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Add table
Reference in a new issue