单军华
2018-07-11 acdf41fa3b32b628d9d7bba1f975060567dad3d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
//  MWFloatView.h
//
//  Created by 刘家飞 on 2016/10/12.
//  Copyright © 2016年 MagicWindow. All rights reserved.
//
 
#import <UIKit/UIKit.h>
 
@protocol MWFloatViewDelegate <NSObject>
 
@optional
/**
 *  即将从当前App返回应用A的时候需要的参数
 *  @return void
 */
- (void)willReturnOriginApp;
 
@end
 
 
@interface MWFloatView : UIView
 
@property (nonatomic, weak, nullable) id <MWFloatViewDelegate> delegate;
 
/**
 *  初始化浮层buttonView
 *  @param y buttonView的y轴的起始位置
 *  @return void
 */
- (nonnull id)initWithYPoint:(float)y;
 
/**
 *  是否开启debug模式,一旦开始debug模式,在不需要返回的时候也会展示buttonView,供开发者参考buttonView的展示样式
 *  @param enable YES开启,NO不开启,默认不开启
 *  @return void
 */
- (void)debugEnable:(BOOL)enable;
 
/**
 *  是否允许buttonView上下滑动
 *  @param enable YES允许滑动,NO不允许滑动,默认允许滑动
 *  @return void
 */
- (void)dragEnable:(BOOL)enable;
 
/**
 *  设置buttonView的上下滑动的区域范围,默认是0~deviceHeight
 *  @param minY:buttonView的允许滑动y轴的最小值,maxY: buttonView的允许滑动y轴的最大值
 *  @return void
 */
- (void)setMinY:(float)minY andMaxY:(float)maxY;
 
/**
 *  设置从当前App返回应用A的时候需要的参数
 *  @param params 返回A时需要传入的参数
 *  @return void
 */
- (void)setReturnOriginAppParams:(nonnull NSDictionary *)params;
 
/**
 *  将buttonView添加到view上
 *  @return void
 */
- (void)show;
 
/**
 *  将buttonView隐藏掉
 *  @return void
 */
- (void)hide;
 
@end