HWPanModalPresenterProtocol.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // HWPanModalPresenterProtocol.h
  3. // Pods
  4. //
  5. // Created by heath wang on 2019/4/29.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import <Foundation/Foundation.h>
  9. #import "HWPanModalPresentable.h"
  10. @class HWPanModalPresentationDelegate;
  11. NS_ASSUME_NONNULL_BEGIN
  12. @protocol HWPanModalPresenter <NSObject>
  13. @property (nonatomic, assign, readonly) BOOL isPanModalPresented;
  14. /**
  15. * 这里我们将实现UIViewControllerTransitioningDelegate协议的delegate通过runtime存入
  16. * 到viewControllerToPresent中。
  17. * use runtime to store this prop to presentedVC
  18. */
  19. @property (nonnull, nonatomic, strong) HWPanModalPresentationDelegate *presentationDelegate;
  20. /**
  21. * Note: This method ONLY for iPad, like UIPopoverPresentationController.
  22. */
  23. - (void)presentPanModal:(UIViewController<HWPanModalPresentable> *)viewControllerToPresent sourceView:(nullable UIView *)sourceView sourceRect:(CGRect)rect;
  24. /**
  25. * Present the Controller from bottom.
  26. */
  27. - (void)presentPanModal:(UIViewController<HWPanModalPresentable> *)viewControllerToPresent;
  28. @end
  29. NS_ASSUME_NONNULL_END