KSDragWindow.h 784 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // KSDragWindow.h
  3. // StudentDaya
  4. //
  5. // Created by 王智 on 2022/5/16.
  6. // Copyright © 2022 DayaMusic. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. #define KSDragWindowWidth (KPortraitWidth / 4.0f)
  11. #define KSDragWindowHeight (KPortraitHeight / 4.0f)
  12. #define KSDragWindowHeightBottomSpace 40.0f
  13. #define KSDragWindowHeightRightSpace 0
  14. typedef NS_ENUM(NSInteger, DRAG_ACTION) {
  15. DRAG_ACTION_CLICK, // 返回详情
  16. DRAG_ACTION_CANCEL, // 取消
  17. };
  18. typedef void(^DragClickAction)(DRAG_ACTION action);
  19. @interface KSDragWindow : UIView // 替换成UIView
  20. @property (nonatomic, strong) UIView *containerView;
  21. @property (nonatomic, strong) UIButton *cancelButton;
  22. - (void)clickAction:(DragClickAction)callback;
  23. @end
  24. NS_ASSUME_NONNULL_END