Swizzle 0.1.0

Swizzle 0.1.0

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2016年12月
SwiftSwift 版本3.0
SPM支持 SPM

Yasuhiro Inami 维护。



Swizzle 0.1.0

  • Yasuhiro Inami

Swizzle

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")

许可证

MIT