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
| extension UIHostingController { | |
| convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
| self.init(rootView: rootView) | |
| if ignoreSafeArea { | |
| disableSafeArea() | |
| } | |
| } | |
| func disableSafeArea() { |
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 ReusableTableViewCell: UITableViewCell { | |
| static let identifier = String(describing: ReusableTableViewCell.self) | |
| var leading: UIView? { | |
| didSet { | |
| if let oldValue = oldValue { | |
| stackView.removeArrangedSubview(oldValue) | |
| } |
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 IdentifiableCell { | |
| static var identifier: String { get } | |
| } | |
| extension IdentifiableCell { | |
| static var identifier: String { String(describing: Self.self) } | |
| } | |
| extension IdentifiableCell where Self: UITableViewCell { | |
| static func dequeue(in tableView: UITableView) -> 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
| class ResumableTimer: NSObject { | |
| private var timer: Timer? = Timer() | |
| private var callback: () -> Void | |
| private var startTime: TimeInterval? | |
| private var elapsedTime: TimeInterval? | |
| // MARK: Init |
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
| /** | |
| * MacEditorTextView | |
| * Copyright (c) Thiago Holanda 2020-2025 | |
| * https://bsky.app/profile/tholanda.com | |
| * | |
| * (the twitter account is now deleted, please, do not try to reach me there) | |
| * https://twitter.com/tholanda | |
| * | |
| * MIT license |
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
| // | |
| // CALayer+AnimationPlayback.swift | |
| // Created by Philip Vasilchenko on 4/27/18. | |
| // | |
| import UIKit | |
| // Pause animations of layer tree | |
| // | |
| // Technical Q&A QA1673: |