BVB Source Codes

AsyncDisplayKit Show ASDelegateProxy.h Source code

Return Download AsyncDisplayKit: download ASDelegateProxy.h Source code - Download AsyncDisplayKit Source code - Type:.h
  1. //
  2. //  ASDelegateProxy.h
  3. //  AsyncDisplayKit
  4. //
  5. //  Copyright (c) 2014-present, Facebook, Inc.  All rights reserved.
  6. //  This source code is licensed under the BSD-style license found in the
  7. //  LICENSE file in the root directory of this source tree. An additional grant
  8. //  of patent rights can be found in the PATENTS file in the same directory.
  9. //
  10.  
  11. #import <Foundation/Foundation.h>
  12.  
  13. @class ASDelegateProxy;
  14. @protocol ASDelegateProxyInterceptor <NSObject>
  15. @required
  16. // Called if the target object is discovered to be nil if it had been non-nil at init time.
  17. // This happens if the object is deallocated, because the proxy must maintain a weak reference to avoid cycles.
  18. // Though the target object may become nil, the interceptor must not; it is assumed the interceptor owns the proxy.
  19. - (void)proxyTargetHasDeallocated:(ASDelegateProxy *)proxy;
  20. @end
  21.  
  22. /**
  23.  * Stand-in for delegates like UITableView or UICollectionView's delegate / dataSource.
  24.  * Any selectors flagged by "interceptsSelector" are routed to the interceptor object and are not delivered to the target.
  25.  * Everything else leaves AsyncDisplayKit safely and arrives at the original target object.
  26.  */
  27.  
  28. @interface ASDelegateProxy : NSProxy
  29.  
  30. - (instancetype)initWithTarget:(id <NSObject>)target interceptor:(id <ASDelegateProxyInterceptor>)interceptor;
  31.  
  32. // This method must be overridden by a subclass.
  33. - (BOOL)interceptsSelector:(SEL)selector;
  34.  
  35. @end
  36.  
  37. /**
  38.  * ASTableView intercepts and/or overrides a few of UITableView's critical data source and delegate methods.
  39.  *
  40.  * Any selector included in this function *MUST* be implemented by ASTableView.
  41.  */
  42.  
  43. @interface ASTableViewProxy : ASDelegateProxy
  44. @end
  45.  
  46. /**
  47.  * ASCollectionView intercepts and/or overrides a few of UICollectionView's critical data source and delegate methods.
  48.  *
  49.  * Any selector included in this function *MUST* be implemented by ASCollectionView.
  50.  */
  51.  
  52. @interface ASCollectionViewProxy : ASDelegateProxy
  53. @end
  54.  
  55. @interface ASPagerNodeProxy : ASDelegateProxy
  56. @end
  57.  
  58.  
downloadASDelegateProxy.h Source code - Download AsyncDisplayKit Source code
Related Source Codes/Software:
lottie-android - Render After Effects animations natively on Androi... 2017-06-07
parse-server - Parse-compatible API server module for Node/Expres... 2017-06-07
react-boilerplate - 2017-06-07
webtorrent - Streaming torrent client for the web ... 2017-06-06
ionicons - The premium icon font for Ionic ... 2017-06-07
storybook - 2017-06-07
prettier - Prettier is an opinionated JavaScript formatter. ... 2017-06-08
inferno - An extremely fast, React-like JavaScript library f... 2017-06-08
guetzli - Perceptual JPEG encoder 2017-06-08
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top