WXScrollerProtocol.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. #import "WXType.h"
  20. @class WXComponent;
  21. @protocol WXScrollerProtocol <NSObject>
  22. /**
  23. * @abstract add sticky component
  24. */
  25. - (void)addStickyComponent:(WXComponent *)sticky;
  26. /**
  27. * @abstract remove sticky component
  28. */
  29. - (void)removeStickyComponent:(WXComponent *)sticky;
  30. /**
  31. * @abstract adjust sticky components
  32. */
  33. - (void)adjustSticky;
  34. /**
  35. * @abstract add scroll listener
  36. */
  37. - (void)addScrollToListener:(WXComponent *)target;
  38. /**
  39. * @abstract remove scroll listener
  40. */
  41. - (void)removeScrollToListener:(WXComponent *)target;
  42. - (void)scrollToComponent:(WXComponent *)component withOffset:(CGFloat)offset animated:(BOOL)animated;
  43. - (BOOL)isNeedLoadMore;
  44. - (void)loadMore;
  45. - (CGPoint)contentOffset;
  46. - (void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated;
  47. - (CGSize)contentSize;
  48. - (void)setContentSize:(CGSize)size;
  49. - (UIEdgeInsets)contentInset;
  50. - (void)setContentInset:(UIEdgeInsets)contentInset;
  51. - (void)resetLoadmore;
  52. - (void)addScrollDelegate:(id<UIScrollViewDelegate>)delegate;
  53. - (void)removeScrollDelegate:(id<UIScrollViewDelegate>)delegate;
  54. - (WXScrollDirection)scrollDirection;
  55. @optional
  56. - (NSString*)refreshType;
  57. - (BOOL)requestGestureShouldStopPropagation:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
  58. /**
  59. * @abstract adjust for RTL
  60. */
  61. - (void)adjustForRTL;
  62. @end