Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)