测试已测试 | ✓ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2016年12月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Yasuhiro Inami 维护。
Swift的方法替换。
swizzleInstanceMethod(MyObject.self, from: #selector(MyObject.hello), to: #selector(MyObject.bye))
swizzleInstanceMethodString(MyObject.self, from: "dealloc", to: "_my_dealloc")
swizzleClassMethod(MyObject.self, from: #selector(MyObject.hello), to: #selector(MyObject.bye))
swizzleClassMethodString(MyObject.self, from: "privateObjCClassMethod", to: "myClassMethod")