Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuenti/tminstancemethodswizzler
Method swizzling library for Objetive-C
https://github.com/tuenti/tminstancemethodswizzler
Last synced: about 4 hours ago
JSON representation
Method swizzling library for Objetive-C
- Host: GitHub
- URL: https://github.com/tuenti/tminstancemethodswizzler
- Owner: tuenti
- License: apache-2.0
- Created: 2014-02-24T11:45:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-11T10:28:50.000Z (over 10 years ago)
- Last Synced: 2024-04-16T12:00:53.066Z (7 months ago)
- Language: Objective-C
- Size: 165 KB
- Stars: 13
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.markdown
- License: LICENSE
Awesome Lists containing this project
README
# TMInstanceMethodSwizzler & TMTimeoutManager
.. image:: https://travis-ci.org/jplana/TMInstanceMethodSwizzler.png?branch=master
:target: https://travis-ci.org/jplana/TMInstanceMethodSwizzler`TMInstanceMethodSwizzler` is a class which allows you to replace or modify an object's method implementation without affecting any other objects of the same class and without side effects either. It might be useful, for instance, to implement Aspect Oriented Programing and to create partial object mocks for testing. You can whatch this [YouTube video](http://www.youtube.com/watch?v=VS9gWhZUpVg) to know about it in greater detail.
`TMTimeoutManager` is an example of use of the previous, which allows you to observe an object's method to be called before a certain timeout and specifying different blocks of code to be invoked depending on whether the method is called or not.
Both are the result of a [Hack me up](http://www.youtube.com/watch?v=IH9m1gt9AHg), an internal contest where Tuenti engineers are given 24 hours to develop whatever they think that might be useful, funny or worth making.
## Installing
### Using CocoaPods
1. Include the following line in your `Podfile`:
```
pod 'TMInstanceMethodSwizzler', :git => 'https://github.com/tuenti/TMInstanceMethodSwizzler'
```
2. Run `pod install`### Manually
1. Clone, add as a submodule or [download TMInstanceMethodSwizzler](https://github.com/tuenti/TMInstanceMethodSwizzler/zipball/master).
2. Add all the files under `Classes` to your project.
3. Make sure your project is configured to use ARC.## Credits & Contact
`TMInstanceMethodSwizzler` was created by [iOS team at Tuenti Technologies S.L.](http://github.com/tuenti).
You can follow Tuenti engineering team on Twitter [@tuentieng](http://twitter.com/tuentieng).## License
`TMInstanceMethodSwizzler` is available under the Apache License, Version 2.0. See LICENSE file for more info.