YBPopupMenuDeviceOrientationManager.h 906 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // YBPopupMenuDeviceOrientationManager.h
  3. // YBPopupMenuDemo
  4. //
  5. // Created by liyuanbo on 2020/1/19.
  6. // Copyright © 2020 LYB. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIDevice.h>
  10. #import <UIKit/UIApplication.h>
  11. #import <UIKit/UIKit.h>
  12. NS_ASSUME_NONNULL_BEGIN
  13. @protocol YBPopupMenuDeviceOrientationManager <NSObject>
  14. /**
  15. 根据屏幕旋转方向自动旋转 Default is YES
  16. */
  17. @property (nonatomic, assign) BOOL autoRotateWhenDeviceOrientationChanged;
  18. @property (nonatomic, copy) void (^deviceOrientDidChangeHandle) (UIInterfaceOrientation orientation);
  19. + (id <YBPopupMenuDeviceOrientationManager>)manager;
  20. /**
  21. 开始监听
  22. */
  23. - (void)startMonitorDeviceOrientation;
  24. /**
  25. 结束监听
  26. */
  27. - (void)endMonitorDeviceOrientation;
  28. @end
  29. @interface YBPopupMenuDeviceOrientationManager : NSObject <YBPopupMenuDeviceOrientationManager>
  30. @end
  31. NS_ASSUME_NONNULL_END