宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-04-06 a1ae6802080a22e6e6ce6d0935e95facb1daca5c
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
//
//  SGQRCodeScanView.h
//  SGQRCodeExample
//
//  Created by kingsic on 2017/8/23.
//  Copyright © 2017年 kingsic All rights reserved.
//
 
#import <UIKit/UIKit.h>
 
typedef enum : NSUInteger {
    /// 默认与边框线同中心点
    CornerLoactionDefault,
    /// 在边框线内部
    CornerLoactionInside,
    /// 在边框线外部
    CornerLoactionOutside
} CornerLoaction;
 
typedef enum : NSUInteger {
    /// 单线扫描样式
    ScanAnimationStyleDefault,
    /// 网格扫描样式
    ScanAnimationStyleGrid
} ScanAnimationStyle;
 
@interface SGQRCodeScanView : UIView
/** 扫描样式,默认 ScanAnimationStyleDefault */
@property (nonatomic, assign) ScanAnimationStyle scanAnimationStyle;
/** 扫描线名 */
@property (nonatomic, copy) NSString *scanImageName;
/** 边框颜色,默认白色 */
@property (nonatomic, strong) UIColor *borderColor;
/** 边角位置,默认 CornerLoactionDefault */
@property (nonatomic, assign) CornerLoaction cornerLocation;
/** 边角颜色,默认微信颜色 */
@property (nonatomic, strong) UIColor *cornerColor;
/** 边角宽度,默认 2.f */
@property (nonatomic, assign) CGFloat cornerWidth;
/** 扫描区周边颜色的 alpha 值,默认 0.2f */
@property (nonatomic, assign) CGFloat backgroundAlpha;
/** 扫描线动画时间,默认 0.02s */
@property (nonatomic, assign) NSTimeInterval animationTimeInterval;
 
/** 添加定时器 */
- (void)addTimer;
/** 移除定时器 */
- (void)removeTimer;
 
@end