Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inamiy/swizzle
Method-Swizzling for Swift.
https://github.com/inamiy/swizzle
Last synced: 5 days ago
JSON representation
Method-Swizzling for Swift.
- Host: GitHub
- URL: https://github.com/inamiy/swizzle
- Owner: inamiy
- License: mit
- Created: 2014-09-14T08:31:43.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T06:59:23.000Z (almost 6 years ago)
- Last Synced: 2024-10-31T19:42:29.527Z (12 days ago)
- Language: Swift
- Size: 20.5 KB
- Stars: 81
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Swizzle
=======Method-Swizzling for Swift.
## Example
```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")
```## Licence
[MIT](https://github.com/inamiy/Swizzle/blob/master/LICENSE)