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
| let styles: [UIFont.TextStyle] = [ | |
| // iOS 17 | |
| .extraLargeTitle, .extraLargeTitle2, | |
| // iOS 11 | |
| .largeTitle, | |
| // iOS 9 | |
| .title1, .title2, .title3, .callout, | |
| // iOS 7 | |
| .headline, .subheadline, .body, .footnote, .caption1, .caption2, | |
| ] |
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 | |
| extension UIImage { | |
| func addBorder(width: CGFloat, color: UIColor) -> UIImage? { | |
| UIGraphicsBeginImageContext(self.size) | |
| let imageRect = CGRect(x: 0, y: 0, width: self.size.width, height: self.size.height) | |
| self.draw(in: imageRect) | |
| let context = UIGraphicsGetCurrentContext() | |
| let borderRect = imageRect.insetBy(dx: width / 2, dy: width / 2) |
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 Combine | |
| extension Publisher { | |
| /// A single value sink function that coalesces either one `Output` or one `Failure` as a `Result`-type. | |
| public func sink(result: @escaping ((Result<Self.Output, Self.Failure>) -> Void)) -> AnyCancellable { | |
| return sink(receiveCompletion: { completion in | |
| switch completion { | |
| case .failure(let error): | |
| result(.failure(error)) |
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
| mr | Marathi | |
|---|---|---|
| bs | Bosnian | |
| ee_TG | Ewe (Togo) | |
| ms | Malay | |
| kam_KE | Kamba (Kenya) | |
| mt | Maltese | |
| ha | Hausa | |
| es_HN | Spanish (Honduras) | |
| ml_IN | Malayalam (India) | |
| ro_MD | Romanian (Moldova) |