⌘ command + J - Choose Editor
⌥ - Open quick find result in secondary editor
⇧ + ⌃ + ⌘ + ↩ - Focus Current Editor
⌃ + ⌘ + J - Jump to definition
⇧ + ⌃ + ⌘ + H - Find Call Hierarchy
| // | |
| // File.swift | |
| // | |
| // | |
| // Created by Declan on 02/11/2019. | |
| // | |
| import Foundation | |
| public final class Imagen { |
| protocol DualTextFieldViewModel { | |
| var field1Hint: String { get } | |
| var field2Hint: String { get } | |
| } | |
| struct NinjaViewModel: DualTextFieldViewModel { | |
| let field1Hint = "Leaf" | |
| let field2Hint = "Nine tail fox" | |
| } |
| import Foundation | |
| class ViewController{ | |
| var networking = URLSession.shared | |
| var isLoading = false | |
| func loadImages() { | |
| print("loading images") | |
| networking.dataTask(with: URL(string: "https://deckofcardsapi.com/api/deck/new/draw/?count=52")!) { (_, _, _) in | |
| print("Load Complete") |
| import UIKit | |
| class ViewController{ | |
| var networking: NetworkManager? = NetworkManager() // Unlike storedHandler this doesn't cause a leak unless it stores the completion | |
| var isLoading = false | |
| func loadImages() { | |
| networking?.downloadImages { isSuccess in | |
| self.isLoading = isSuccess | |
| print("Images download completed") |
| import UIKit | |
| class ViewController{ | |
| var networking: NetworkManager? = NetworkManager() // Unlike storedHandler this doesn't cause a leak unless it stores the completion | |
| var isLoading = false | |
| func loadImages() { | |
| networking?.downloadImages { isSuccess in | |
| self.isLoading = isSuccess | |
| print("Images download completed") |
⌘ command + J - Choose Editor
⌥ - Open quick find result in secondary editor
⇧ + ⌃ + ⌘ + ↩ - Focus Current Editor
⌃ + ⌘ + J - Jump to definition
⇧ + ⌃ + ⌘ + H - Find Call Hierarchy
| // | |
| // Architecture.swift | |
| // TumblrSnapshotTestCase | |
| // | |
| // Created by Declan McKenna on 26/01/2022. | |
| // | |
| import Foundation | |
| @objc(PSTArchitecture) public final class Architecture: NSObject { // @arnold no-tests |