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
// ºººº----------------------------------------------------------------------ºººº \\ | |
// | |
// Credit Hamad Fuad. | |
// | |
// Author: Hamad Fuad | |
// Email: [email protected] | |
// | |
// Created At: 24/01/2022 | |
// Last modified: 24/01/2022 | |
// |
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
// ºººº----------------------------------------------------------------------ºººº \\ | |
// | |
// Credit Hamad Fuad. | |
// | |
// Author: Hamad Fuad | |
// Email: [email protected] | |
// | |
// Created At: 24/01/2022 | |
// Last modified: 24/01/2022 | |
// |
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 | |
import OSLog | |
public class Log { | |
/// Show message while debugging | |
static func debug(category: String = "MyApp", _ message: String) { | |
Logger.message().debug("[Debug] \(message)") | |
} |
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 | |
import KeychainAccess | |
@propertyWrapper | |
struct KeychainStorage<T: Codable>: DynamicProperty { | |
// ... | |
} |
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
var wrappedValue: Value? { | |
get { value } | |
nonmutating set { | |
value = newValue | |
do { |
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
typealias Value = T | |
let key: String | |
@State private var value: Value? | |
init(wrappedValue: Value? = nil, _ key: String) { | |
self.key = key |
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
struct DraggableScaleableRotatableModifier: ViewModifier { | |
@State private var showingAlert = false | |
@Binding var lastOffset: CGSize | |
@Binding var lastRotation: Angle | |
@Binding var offset: CGSize | |
@Binding var scale: CGFloat | |
@Binding var angle: Angle |