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
| // TaskQueue.swift | |
| import Foundation | |
| class TaskQueue { | |
| private actor TaskQueueActor { | |
| private var blocks = [() async -> Void]() | |
| private var currentTask: Task<Void, Never>? | |
| func addBlock(priority: TaskPriority? = nil, block: @escaping () async -> Void) { |
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
| // Logger.swift | |
| import Foundation | |
| import os.log | |
| // swiftlint:disable line_length | |
| func log(_ messages: Any..., file: String = #fileID, function: String = #function, line: Int = #line) { | |
| // actually impossible cases | |
| guard let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String else { | |
| return print("Unable to get App Name") |
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 SwiftUI | |
| struct CarouselView: View { | |
| @State private var currentCardIndex = 2 | |
| @GestureState private var dragOffset: CGFloat = 0 | |
| @State private var sampleArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
| var body: some View { | |
| HStack(spacing: 0) { |
NewerOlder