This file contains hidden or 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 VideoPlayerView: UIView { | |
fileprivate let resourcePath: String | |
fileprivate let fileExtension: String | |
fileprivate let asset: AVAsset | |
fileprivate let playerItem: AVPlayerItem | |
fileprivate let player: AVPlayer | |
public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } | |
public init(resourcePath: String, ofType: String) { | |
self.resourcePath = resourcePath |
This file contains hidden or 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 UIKit | |
import SwiftUI | |
class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
var window: UIWindow? | |
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
if let windowScene = scene as? UIWindowScene { | |
let window = UIWindow(windowScene: windowScene) | |
self.window = window | |
} |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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": [ | |
{ |