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 | |
struct Downsampler { | |
// MARK: - functions | |
static func downsampleImage(imageURL: URL, frameSize: CGSize, | |
scale: CGFloat = UIScreen.main.scale) -> UIImage? { | |
/// creates an CGImageSource that represent an image | |
let imageSourceOptions = [kCGImageSourceShouldCache: false] as CFDictionary | |
guard let imageSource = CGImageSourceCreateWithURL(imageURL as CFURL, imageSourceOptions) else { |
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 Foundation | |
import OSLog | |
enum LogType { | |
case info | |
case notice | |
case warning | |
case fault | |
// case debug |
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 | |
extension Color { | |
init(hex: String) { | |
self.init(UIColor(hex: hex)) | |
} | |
} | |
extension UIColor { |
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
Fonts- | |
1. Google Fonts - https://fonts.google.com/ | |
2. Be Fonts - https://befonts.com/ | |
3. YouWorkForThem - https://www.youworkforthem.com | |
4. Abstract Fonts - https://www.abstractfonts.com/ | |
5. Fontasy - http://www.fontasy.de/ | |
Illustrations- | |
1. Free Illustrations - https://freeillustrations.xyz/ | |
2. Ouch! by Icons8 - https://icons8.com/illustrations |