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 extension View { | |
| func rSheet<Content: View>( | |
| isPresented: Binding<Bool>, | |
| detents: RPresentationDetent = .medium, | |
| @ViewBuilder content: @escaping () -> Content | |
| ) -> some View { | |
| self.modifier( | |
| RPresentationDetentModifier( | |
| isPresented: isPresented, | |
| detents: detents, |
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
| final class PingVM { | |
| private let session: URLSession | |
| private(set) var pingTime: Int? | |
| init() { | |
| let sessionConfig = URLSessionConfiguration.default | |
| sessionConfig.timeoutIntervalForRequest = 5.0 | |
| sessionConfig.timeoutIntervalForResource = 5.0 | |
| self.session = URLSession(configuration: sessionConfig) | |
| } |
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 FirebaseFirestore | |
| import FirebaseFirestoreSwift | |
| struct FirebaseStoreImporter { | |
| private let firestore: Firestore | |
| init() { | |
| self.firestore = Firestore.firestore() | |
| } | |
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
| enum ButtonStyle: String, RawRepresentable { | |
| case dark, light, `default` | |
| } | |
| protocol ButtonStyleProductProtocol { | |
| var style: ButtonStyle { get set } | |
| var font: UIFont { get set } | |
| var description: String { get } | |
| } |
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 | |
| enum YanoneKaffeesatz: String { | |
| case bold = "YanoneKaffeesatz-Bold" | |
| case extraLight = "YanoneKaffeesatz-ExtraLight" | |
| case light = "YanoneKaffeesatz-Light" | |
| case medium = "YanoneKaffeesatz-Medium" | |
| case regular = "YanoneKaffeesatz-Regular" | |
| case semiBold = "YanoneKaffeesatz-SemiBold" | |
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 | |
| class PerspectiveTransformView: UIView { | |
| override func awakeFromNib() { | |
| super.awakeFromNib() | |
| addPanGesture(self) | |
| } | |
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
| protocol Toggleable { | |
| mutating func toggle() | |
| } | |
| enum CardOrientation: String, Toggleable { | |
| case Horizontal = "hor" | |
| case Vertical = "ver" | |
| mutating func toggle() { | |
| switch self { |
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 | |
| final class Element { | |
| init() { | |
| print("Element init is called") | |
| } | |
| deinit { | |
| print("Element deinit is called") | |
| } |
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 | |
| typealias MimeTypeIdentifier = String | |
| enum DefaultMimeType: MimeTypeIdentifier { | |
| case pdf = "application/pdf" | |
| case jpeg = "application/jpeg" | |
| } | |
| enum MimeType { |
NewerOlder