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
| // | |
| // UIView+Shimmer.swift | |
| // | |
| // Created by Romanov, Radu on 6/12/19. | |
| // | |
| import Foundation | |
| extension UIView { | |
| func startShimmerAnimation() { |
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
| // Created by Nedrow, David E on 2018-11-03. | |
| // Attribution 4.0 International (CC 4.0), see bottom. | |
| import Foundation | |
| /// Implement this protocol if you need to check whether the application is running in an XCTest context. | |
| /// Default implementations are provided. | |
| /// By their nature, these test–related queries can't themselves be exhaustively unit tested. | |
| protocol XCTestProtocol { | |
| /// Used to determine if the app is running in an XCTest context. |
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
| // Created by Nedrow, David E on 2019-04-11. | |
| // Attribution 4.0 International (CC 4.0), see bottom. | |
| import Foundation | |
| // MARK: - UIColor+RGBAProtocol.swift | |
| /// Defines functions for transforming RGBA values. | |
| public protocol RGBAProtocol { | |
| /// Create a color from the given RGBA value. |
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
| // Created by Nedrow, David E on 3/25/19. | |
| // Attribution 4.0 International (CC 4.0), see bottom. | |
| import UIKit | |
| // MARK: - UIColor+ContrastColor.swift | |
| /// This protocol defines functions for determining contrasting colors and other | |
| /// color related values. | |
| public protocol ContrastColorProtocol { | |
| /// Calculates the luminance of the given color. |
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
| // Created by Nedrow, David E on 3/25/19. | |
| // Attribution 4.0 International (CC 4.0), see bottom. | |
| import UIKit | |
| // MARK: - UIColor+ARGBProtocol.swift | |
| /// Definitions for ARGB related utilities. | |
| public protocol ARGBProtocol { | |
| /// Create a color from the given ARGB value. | |
| /// |
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
| // Created by Nedrow, David E on 3/25/19. | |
| // This work is licensed under Attribution 4.0 International (CC 4.0) | |
| import UIKit | |
| // MARK: - String+IntFromHex.swift | |
| /// This protocol defines functions related to hex string conversion. | |
| public protocol HexStringProtocol { | |
| /// Create an int from a given hex value string. |
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
| // Created by Nedrow, David E on 2/21/18. | |
| // This work is licensed under Attribution 4.0 International (CC 4.0) | |
| import Foundation | |
| /// Mechanism that provides something resembling stored properties for extensions. | |
| /// | |
| /// Usage: | |
| /// | |
| /// 1. Extend your class with the PropertyStoring protocol. |
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
| // Created by David Nedrow on 4/9/19. | |
| // This work is licensed under Attribution 4.0 International (CC 4.0) | |
| public extension String { | |
| /// returns the string from first `limit` number of characters. Appends `...` if string is truncated | |
| func truncate(limit: Int) -> String { | |
| guard self.count > limit else { | |
| return 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
| // Created by Nedrow, David E on 2019-06-28. | |
| // This work is licensed under Attribution 4.0 International (CC 4.0) | |
| import Foundation | |
| /// This protocol provides access to the screaming snake case | |
| /// value of a string. | |
| public protocol ScreamingSnakeCaseRepresentable: Encodable { | |
| /// The screaming snake case version. | |
| var screamingSnakeCaseValue: String { get } |
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
| // | |
| // Array_SafeAccess.swift | |
| // | |
| // Created by Zhao, Tyler on 6/26/19. | |
| // | |
| import Foundation | |
| /// This protocol describes a function designed to return an optional | |
| /// on a bad array access. |