Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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.