Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 ReusableView where Self: UIView { | |
static var reuseIdentifier: String { | |
return String(describing: self) | |
} | |
} | |
extension UITableViewCell: ReusableView {} | |
extension UITableViewHeaderFooterView: ReusableView {} | |
extension UICollectionView: ReusableView {} |
This file contains 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
@available(iOS 13.0, *) | |
@propertyWrapper | |
public final class PublishedUserDefault<T: DefaultsSerializable> where T.T == T { | |
public let key: DefaultsKey<T> | |
private var _value: T.T? | |
private var observation: DefaultsDisposable? | |
public init(keyPath: KeyPath<DefaultsKeys, DefaultsKey<T>>) { | |
self.key = Defaults.keyStore[keyPath: keyPath] |