XFCameraButton.h
963 Bytes
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
//
// XFCameraButton.h
//
//
// Created by xf-ling on 2017/6/1.
// Copyright © 2017年 LXF. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^TapEventBlock)(UITapGestureRecognizer *tapGestureRecognizer);
typedef void(^LongPressEventBlock)(UILongPressGestureRecognizer *longPressGestureRecognizer);
@interface XFCameraButton : UIView
/**
* 设置进度条的录制视频时长百分比 = 当前录制时间 / 最大录制时间
*/
@property (nonatomic, assign) CGFloat progressPercentage;
+ (instancetype)defaultCameraButton;
/**
* 配置点击事件
*/
- (void)configureTapCameraButtonEventWithBlock:(TapEventBlock)tapEventBlock;
/**
* 配置按压事件
*/
- (void)configureLongPressCameraButtonEventWithBlock:(LongPressEventBlock)longPressEventBlock;
/**
* 开始录制前的准备动画
*/
- (void)startShootAnimationWithDuration:(NSTimeInterval)duration;
/**
* 结束摄影动画
*/
- (void)stopShootAnimation;
@end