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 | |
enum LogType { | |
case info | |
case notice | |
case warning | |
case fault | |
// case debug |
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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
self.registerForAppTrackingTransparency(launchOptions) | |
return true | |
} | |
private func registerForAppTrackingTransparency(_ launchOptions: [UIApplication.LaunchOptionsKey: Any]?) { | |
if #available(iOS 14, *) { | |
ATTrackingManager.requestTrackingAuthorization { (status) in |
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 | |
class Box<T> { | |
typealias Listener = (T) -> () | |
// MARK:- variables | |
var value: T { | |
didSet { | |
listener?(value) |
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
<key>UIAppFonts</key> | |
<array> | |
<string>Code Pro Bold LC.otf</string> | |
<string>Code Pro LC.otf</string> | |
<string>Montserrat-Bold.ttf</string> | |
<string>Montserrat-Italic.ttf</string> | |
<string>Montserrat-Medium.ttf</string> | |
<string>Montserrat-MediumItalic.ttf</string> | |
<string>Montserrat-Regular.ttf</string> | |
<string>Montserrat-SemiBold.ttf</string> |
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 UIKit | |
extension UIColor { | |
/// For converting Hex-based colors | |
convenience init(hex: String) { | |
var hexSanitized = hex.trimmingCharacters(in: .whitespacesAndNewlines) | |
hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "") | |
var rgb: UInt64 = 0 | |
var r: CGFloat = 0.0 |
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 UIKit | |
extension UIColor { | |
/// For converting Hex-based colors | |
convenience init(hex: String) { | |
var hexSanitized = hex.trimmingCharacters(in: .whitespacesAndNewlines) | |
hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "") | |
var rgb: UInt64 = 0 | |
var r: CGFloat = 0.0 |
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 | |
extension Color { | |
init(hex: String) { | |
self.init(UIColor(hex: hex)) | |
} | |
} | |
extension UIColor { |
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
<key>UIAppFonts</key> | |
<array> | |
<string>Montserrat-Bold.ttf</string> | |
<string>Montserrat-Italic.ttf</string> | |
<string>Montserrat-Medium.ttf</string> | |
<string>Montserrat-MediumItalic.ttf</string> | |
<string>Montserrat-Regular.ttf</string> | |
<string>Montserrat-SemiBold.ttf</string> | |
<string>Montserrat-SemiBoldItalic.ttf</string> | |
<string>Montserrat-Thin.ttf</string> |
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 | |
enum Montserrat { | |
case thin | |
case thinItalic | |
case regular | |
case italic | |
case medium | |
case mediumItalic | |
case semibold |
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 | |
extension Color { | |
init(hex: String) { | |
self.init(UIColor(hex: hex)) | |
} | |
static func randomColor() -> Color { | |
return Color(UIColor.random()) |
NewerOlder