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 | |
@IBDesignable class PaddingLabel: UILabel { | |
@IBInspectable var topInset: CGFloat = 5.0 | |
@IBInspectable var bottomInset: CGFloat = 5.0 | |
@IBInspectable var leftInset: CGFloat = 16.0 | |
@IBInspectable var rightInset: CGFloat = 16.0 | |
override func drawText(in rect: CGRect) { |
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 QuartzCore | |
class CircleImageView : UIView { | |
var image: UIImage! { | |
didSet { | |
self.addLayers() | |
} | |
} | |
override var frame: CGRect { |
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 Foundation | |
protocol ApiRequest { | |
var urlRequest: URLRequest { get } | |
} | |
protocol ApiClient { | |
func execute<T>(request: ApiRequest, completionHandler: @escaping (_ result: Result<ApiResponse<T>>) -> Void) | |
} |
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 Foundation | |
/** | |
Extension on `Dictionary` that adds different helper methods such as JSON `Data` serialization | |
*/ | |
public extension Dictionary where Key: ExpressibleByStringLiteral, Value: Any { | |
/** | |
Heper method that serializes the `Dictionary` to JSON `Data` | |
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 FullWidthCenteredImageView: UIView { | |
var image: UIImage!{ | |
didSet { | |
self.frame = CGRect(origin: self.frame.origin, size: self.frame.size) | |
} | |
} | |
override var frame: CGRect { | |
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 QuartzCore | |
class CircleImageView : UIView { | |
var image: UIImage! { | |
didSet { | |
self.addLayers() | |
} | |
} | |
override var frame: CGRect { |