View HList.swift
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
//: A UIKit based Playground for presenting user interface | |
import SwiftUI | |
import PlaygroundSupport | |
struct HList<Content: View>: View { | |
@State private var scrollOffset: CGFloat = 0 | |
@State private var previousScrollOffset: CGFloat = 0 | |
private let numberOfItems: Int |
View DateField.swift
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
// | |
// DateField.swift | |
// | |
// Created by Szymon Lorenz on 22/2/20. | |
// Copyright © 2020 Szymon Lorenz. All rights reserved. | |
// | |
import SwiftUI | |
struct DateTextField: UIViewRepresentable { |
View JoystickView.swift
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 SwiftUI | |
struct JoystickView: View { | |
@State private var dragPosition: CGPoint? = nil | |
typealias JoystickAction = (CGPoint?) -> Void | |
private var translationAction: JoystickAction? | |
private var gripColor: Color = .white | |
init(_ translationAction: JoystickAction? = nil) { |
View Extensions
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
// | |
// Created by Szymon Lorenz on 9/11/19. | |
// Copyright © 2019 Szymon Lorenz. All rights reserved. | |
// | |
import Foundation | |
import Combine | |
/// Error localized description | |
enum DataTaskError : Error { |
View URLResponse.swift
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 | |
extension URLResponse { | |
var HTTPResponse: HTTPURLResponse? { | |
return self as? HTTPURLResponse | |
} | |
} |
View PushFromItemAnimator.swift
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
// | |
// PushFromItemAnimator.swift | |
// Between | |
// | |
// Created by Shial on 11/9/18. | |
// Copyright © 2018 Szymon Lorenz Solutions. All rights reserved. | |
// | |
import UIKit |
View Log.swift
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 | |
public class Log { | |
private enum LogType: Int, CustomStringConvertible { | |
public var description: String { | |
switch self { | |
case .verbose: | |
return "[VERBOSE]" | |
case .info: | |
return "[INFO]" |