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 | |
| protocol ContainmentProvider: class { | |
| func addChild(_ viewController: UIViewController, to containerView: UIView) | |
| func removeChild(_ viewController: UIViewController?) | |
| } | |
| extension ContainmentProvider where Self: UIViewController { | |
| func addChild(_ viewController: UIViewController, to containerView: UIView) { | |
| self.addChild(viewController) |
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 ShadowView: UIView { | |
| var color: UIColor = .white { | |
| didSet { | |
| self.setNeedsDisplay() | |
| } | |
| } | |
| var cornerRadius: CGFloat = 12 { | |
| didSet { |
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 PopoverController: UIViewController { | |
| enum Source { | |
| case barButtonItem(item: UIBarButtonItem) | |
| case sourceView(view: UIView?) | |
| } | |
| private var contentViewController: UIViewController? |
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 | |
| public class AppHUD { | |
| public init() {} | |
| public enum `Type` { | |
| case definite(String?, String?) | |
| case indefinite | |
| case message(UIImage?, String?, String?, TimeInterval) |
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 ShadowView: UIView { | |
| var color: UIColor? { | |
| didSet { | |
| self.setNeedsDisplay() | |
| } | |
| } | |
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 Identifiable { | |
| static var identifier: String { get } | |
| } | |
| extension Identifiable where Self: UIViewController { | |
| static var identifier: String { | |
| return String(describing: 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
| import UIKit | |
| extension ModalPresentationAnimator { | |
| enum Mode { | |
| case present | |
| case dismiss | |
| } | |
| enum AnimationStyle { | |
| case modal | |
| case pop |
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 FileCoordinator { | |
| static func isFileExist(at url: URL, destinationUrl: @escaping (URL?)->Void) { | |
| let backgroundQueue = DispatchQueue.global(qos: DispatchQoS.QoSClass.background) | |
| backgroundQueue.async { | |
| guard let documentUrl = FileManager.default.urls(for: .documentDirectory, in: FileManager.SearchPathDomainMask.userDomainMask).first else { | |
| DispatchQueue.main.async { |