Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haifengkao/wzprotocolinterceptor
a intermediate proxy class to forward Objective-C delegate messages for iOS platforms
https://github.com/haifengkao/wzprotocolinterceptor
Last synced: about 2 months ago
JSON representation
a intermediate proxy class to forward Objective-C delegate messages for iOS platforms
- Host: GitHub
- URL: https://github.com/haifengkao/wzprotocolinterceptor
- Owner: haifengkao
- License: other
- Created: 2015-06-04T11:13:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-26T11:26:02.000Z (about 8 years ago)
- Last Synced: 2023-10-05T10:53:25.350Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 43 KB
- Stars: 22
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WZProtocolInterceptor
[![CI Status](http://img.shields.io/travis/Hai Feng Kao/WZProtocolInterceptor.svg?style=flat)](https://travis-ci.org/Hai Feng Kao/WZProtocolInterceptor)
[![Version](https://img.shields.io/cocoapods/v/WZProtocolInterceptor.svg?style=flat)](http://cocoapods.org/pods/WZProtocolInterceptor)
[![License](https://img.shields.io/cocoapods/l/WZProtocolInterceptor.svg?style=flat)](http://cocoapods.org/pods/WZProtocolInterceptor)
[![Platform](https://img.shields.io/cocoapods/p/WZProtocolInterceptor.svg?style=flat)](http://cocoapods.org/pods/WZProtocolInterceptor)I shamelessly copy the code from [SO](http://stackoverflow.com/questions/3498158/intercept-objective-c-delegate-messages-within-a-subclass).
All credits and rights belong to WeZZard.## Example
To intercept the messages between dataSource and UICollectionView
```objc
WZProtocolInterceptor* dataSourceInterceptor = [[WZProtocolInterceptor alloc]
initWithInterceptedProtocol:@protocol(UICollectionViewDataSource)];
dataSourceInterceptor.middleMan = self;
dataSourceInterceptor.receiver = dataSource;
_dataSourceInterceptor = dataSourceInterceptor;
_collectionView.dataSource = (id) dataSourceInterceptor;
```
## Requirements## Installation
WZProtocolInterceptor is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "WZProtocolInterceptor"
```## Author
WeZZard
## License
WZProtocolInterceptor is available under the CC-BY-SA 3.0 license. See the LICENSE file for more info.