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
| [ | |
| { | |
| "canonical": "Algeria", | |
| "country_code": "dz", | |
| "language_codes": [ | |
| "fr", | |
| "ar" | |
| ] | |
| }, | |
| { |
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 | |
| import QuartzCore | |
| //MARK: - NSCopying | |
| extension CAMediaTimingFunction: NSCopying { | |
| public func copy(with zone: NSZone? = nil) -> Any { | |
| let c1 = controlPoint1 | |
| let c2 = controlPoint2 | |
| return CAMediaTimingFunction(controlPoints: Float(c1.x), Float(c1.y), Float(c2.x), Float(c2.y)) |
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 UIView { | |
| struct AnimationContext { | |
| public let duration: TimeInterval | |
| public let timingParameters: UITimingCurveProvider? | |
| } | |
| } | |
| extension UIView { |
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 UIEdgeInsets { | |
| var horizontalSum: CGFloat { | |
| return left + right | |
| } | |
| var verticalSum: CGFloat { | |
| return top + bottom | |
| } | |
| } |
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 tinted(with tintColor: UIColor) -> UIImage { | |
| guard let cgImage = cgImage else { return self } | |
| UIGraphicsBeginImageContextWithOptions(size, false, scale) | |
| defer { UIGraphicsEndImageContext() } | |
| guard let context = UIGraphicsGetCurrentContext() else { return self } |