Files
keyboard/keyBoard/Class/Vender/WMDragView/WMDragView.h

78 lines
2.3 KiB
C
Raw Normal View History

2025-11-14 14:07:04 +08:00
//
// WMDragView.h
// WMDragView
//
// Created by zhengwenming on 2016/12/16.
//
//
#import <UIKit/UIKit.h>
// 拖曳view的方向
typedef NS_ENUM(NSInteger, WMDragDirection) {
WMDragDirectionAny, /**< 任意方向 */
WMDragDirectionHorizontal, /**< 水平方向 */
WMDragDirectionVertical, /**< 垂直方向 */
};
@interface WMDragView : UIView
/**
YES
YES
NO
*/
@property (nonatomic,assign) BOOL dragEnable;
/**
frame范围内
frame不要大于父视图范围
frame为0000framedragEnable这个属性为NO
*/
@property (nonatomic,assign) CGRect freeRect;
/**
any
*/
@property (nonatomic,assign) WMDragDirection dragDirection;
/**
contentView内部懒加载的一个UIImageView
view中
使imageView和button
*/
@property (nonatomic,strong) UIImageView *imageView;
/**
contentView内部懒加载的一个UIButton
view中
使imageView和button
*/
@property (nonatomic,strong) UIButton *button;
/**
NO,
isKeepBounds = YES
isKeepBounds = NO free()frame
*/
@property (nonatomic,assign) BOOL isKeepBounds;
/**
block
*/
@property (nonatomic,copy) void(^clickDragViewBlock)(WMDragView *dragView);
/**
block
*/
@property (nonatomic,copy) void(^beginDragBlock)(WMDragView *dragView);
/**
block
*/
@property (nonatomic,copy) void(^duringDragBlock)(WMDragView *dragView);
/**
block
*/
@property (nonatomic,copy) void(^endDragBlock)(WMDragView *dragView);
@end