* **Simpler and safer key paths**, using EXTKeyPathCoding, which automatically checks key paths at compile-time.
libextobjc (0.2.5)
A Cocoa library to extend the Objective-C programming language.
- Homepage: https://github.com/jspahrsummers/libextobjc
- Source: https://github.com/jspahrsummers/libextobjc.git
- Versions: 0.2.5, 0.2.4, 0.2.3, 0.2.0, 0.1.0 [master repo]
1.使用@keypath 允许在编译期验证 key paths。
2.通过对象.属性指定 keypath 不再是字符串了。
3. * @code
NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String);
//可以观察 类方法变量了?这个要试试看
NSString *versionPath = @keypath(NSObject.class, version);
4.使用refactoring 修改变量名称时,keypath 也会同时更新。
5.避免了原来字符串指定keypath时,可能忘记修改keypath引起的错误。
The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other dynamic programming languages (including those that are not necessarily object-oriented).
libextobjc is meant to be very modular – most of its classes and modules can be used with no more than one or two dependencies.
Please feel free to open issues for feature requests or ideas for language extensions (even if you have no idea how they'd work)!
Thunder Download Plugin
Thunder Download Plugin