UIViewController+Presentation.h 986 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // UIViewController+Presentation.h
  3. // HWPanModal
  4. //
  5. // Created by heath wang on 2019/4/29.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import "HWPanModalPresentable.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. /**
  11. * The presented Controller can use the category to update UIPresentationController container.
  12. */
  13. @interface UIViewController (Presentation)
  14. /**
  15. * force update pan modal State, short/long
  16. */
  17. - (void)hw_panModalTransitionTo:(PresentationState)state NS_SWIFT_NAME(panModalTransitionTo(state:));
  18. /**
  19. * When presented ViewController has a UIScrollView,
  20. * Use This method to update UIScrollView contentOffset
  21. */
  22. - (void)hw_panModalSetContentOffset:(CGPoint)offset NS_SWIFT_NAME(panModalSetContentOffset(offset:));
  23. /**
  24. * Note:if we present a NavigationController, and we want to pan screen edge to dismiss.
  25. * We MUST call this method when we PUSH/POP viewController.
  26. *
  27. */
  28. - (void)hw_panModalSetNeedsLayoutUpdate NS_SWIFT_NAME(panModalSetNeedsLayoutUpdate());
  29. @end
  30. NS_ASSUME_NONNULL_END