This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get ViewController | |
let storyboard = UIStoryboard(name: "Storyboard", bundle: nil) | |
let viewController = storyboard.instantiateViewControllerWithIdentifier("XXXX") as! ViewController | |
// PerformSegue | |
performSegueWithIdentifier("Open", sender: sender) | |
// Nib | |
let nib = UINib(nibName: "TableViewCell", bundle: nil) | |
let cell = nib.instantiateWithOwner(nil, options: nil)[0] as! TableViewCell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kuri setup | |
created Kuri.yml. | |
created template for Entity | |
created template for DataStore | |
created template for Repository | |
created template for UseCase | |
created template for Translator | |
created template for Model | |
created template for Presenter | |
created template for View |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"kind": "SourceFile", | |
"layout": [ | |
{ | |
"kind": "CodeBlockItemList", | |
"layout": [ | |
{ | |
"kind": "CodeBlockItem", | |
"layout": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"kind": "SourceFile", | |
"layout": [ | |
{ | |
"kind": "CodeBlockItemList", | |
"layout": [ | |
{ | |
"kind": "CodeBlockItem", | |
"layout": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// Automatically Generated From SyntaxFactory.swift.gyb. | |
//// Do Not Edit Directly! | |
//===------- SyntaxFactory.swift - Syntax Factory implementations ---------===// | |
// | |
// This source file is part of the Swift.org open source project | |
// | |
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors | |
// Licensed under Apache License v2.0 with Runtime Library Exception | |
// | |
// See https://swift.org/LICENSE.txt for license information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let comma = SyntaxFactory.makeCommaToken( | |
trailingTrivia: [.newlines(lineBreakCount), .spaces(trailingIndent)] | |
) | |
newParamter = newParamter.withTrailingComma(comma) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct FunctionParameterSyntax: Syntax, _SyntaxBase, Hashable { | |
enum Cursor: Int { | |
case attributes | |
case firstName | |
case secondName | |
case colon | |
case type | |
case ellipsis | |
case defaultArgument | |
case trailingComma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Model: NSObject { | |
@objc dynamic init(x: Int) { | |
print("x: \(x)") | |
} | |
@objc dynamic init(y: Int) { | |
print("y: \(y)") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let odd = [1,2,3].filter { $0 % 2 == 1 } | |
let numbers: [Int] = [1,2,3] | |
let odd: [Int] = numbers.filter { (number: Int) -> Bool in | |
return number % 2 == 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// Library A start | |
public typealias MediaSourceConnection = Any | |
public struct MediaEvent<T> { | |
init<T>(_ t: T) { } | |
} | |
public protocol MediaSink: AnyObject { | |
associatedtype InputMedia |
OlderNewer