HWPanModalIndicatorProtocol.h 773 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // HWPanModalIndicatorProtocol.h
  3. // HWPanModal
  4. //
  5. // Created by heath wang on 2019/8/9.
  6. //
  7. typedef NS_ENUM(NSUInteger, HWIndicatorState) {
  8. HWIndicatorStateNormal NS_SWIFT_NAME(normal), // origin state
  9. HWIndicatorStatePullDown NS_SWIFT_NAME(pull), // drag down state
  10. };
  11. static CGFloat const kIndicatorYOffset = 5;
  12. @protocol HWPanModalIndicatorProtocol <NSObject>
  13. /**
  14. * When user drags, the state will change.
  15. * You can change your UI here.
  16. * @param state The state when drag changed.
  17. */
  18. - (void)didChangeToState:(HWIndicatorState)state;
  19. /**
  20. * Tell the size of the indicator.
  21. */
  22. - (CGSize)indicatorSize;
  23. /**
  24. * You can layout your UI here if you need.
  25. * This method called when indicator added to super view
  26. */
  27. - (void)setupSubviews;
  28. @end