测试已测试 | ✓ |
语言语言 | SwiftSwift |
许可协议 | MIT |
发布上次发布 | 2017年11月 |
SwiftSwift 版本 | 4.0 |
SPM支持 SPM | ✗ |
由 Jordan Zucker 维护。
要运行示例项目,首先将仓库克隆到本地,然后在 Example 目录下运行 pod install
。
SwiftyKit 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 即可:
pod "SwiftyKit"
/// A type-erased key path, from any root type to any resulting value type.
public class AnyKeyPath : Hashable {
/// The root type for this key path.
public static var rootType: Any.Type { get }
/// The value type for this key path.
public static var valueType: Any.Type { get }
/// The hash value.
///
/// Hash values are not guaranteed to be equal across different executions of
/// your program. Do not save hash values to use during a future execution.
final public var hashValue: Int { get }
/// Returns a Boolean value indicating whether two values are equal.
///
/// Equality is the inverse of inequality. For any values `a` and `b`,
/// `a == b` implies that `a != b` is `false`.
///
/// - Parameters:
/// - lhs: A value to compare.
/// - rhs: Another value to compare.
public static func ==(a: AnyKeyPath, b: AnyKeyPath) -> Bool
}
/// A partially type-erased key path, from a concrete root type to any
/// resulting value type.
public class PartialKeyPath<Root> : AnyKeyPath {
}
/// A key path from a specific root type to a specific resulting value type.
public class KeyPath<Root, Value> : PartialKeyPath<Root> {
}
/// A key path that supports reading from and writing to the resulting value.
public class WritableKeyPath<Root, Value> : KeyPath<Root, Value> {
}
/// A key path that supports reading from and writing to the resulting value
/// with reference semantics.
public class ReferenceWritableKeyPath<Root, Value> : WritableKeyPath<Root, Value> {
}
jzucker2, [email protected]
SwiftyKit 在 MIT 许可协议下提供。有关更多信息,请参阅 LICENSE 文件。