Skip to content

Commit 07da0a6

Browse files
yFeiiGY
andauthored
Fix/maskview crash (#1201)
* fix crash * feat: ios 3.1.6 --------- Co-authored-by: GY <hishiguangyuan@didiglobal.com>
1 parent bd104f8 commit 07da0a6

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

DoraemonKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Pod::Spec.new do |s|
99
s.name = 'DoraemonKit'
10-
s.version = '3.1.5'
10+
s.version = '3.1.6'
1111
s.summary = 'iOS 各式各样的工具集合'
1212

1313
# This description is used to generate tags and improve search results.

iOS/DoraemonKit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRScanView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN
6060
可自定义的蒙版View,可在上面添加自定义控件,也可以改变背景颜色,透明度
6161
默认为50%透明度黑色,遮盖区域依赖scanRect,需先指定scanRect,否则为默认
6262
*/
63-
@property (nonatomic, strong) UIView *maskView;
63+
@property (nonatomic, strong) UIView *coverView;
6464

6565
/**
6666
上下移动的扫描线的颜色,默认为橙色

iOS/DoraemonKit/Src/Core/Plugin/Common/H5/QRCode/DoraemonQRScanView.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ - (BOOL)statusCheck{
163163

164164
- (void)setupViews{
165165
[self addSubview:self.middleView];
166-
[self addSubview:self.maskView];
166+
[self addSubview:self.coverView];
167167
[self.middleView addSubview:self.scanLine];
168168
if (self.isShowCornerLine) {
169169
[self addCornerLines];
@@ -326,18 +326,18 @@ - (UIView *)middleView{
326326
return _middleView;
327327
}
328328

329-
- (UIView *)maskView{
330-
if (!_maskView) {
331-
_maskView = [[UIView alloc]initWithFrame:self.bounds];
332-
_maskView.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
329+
- (UIView *)coverView{
330+
if (!_coverView) {
331+
_coverView = [[UIView alloc]initWithFrame:self.bounds];
332+
_coverView.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
333333
UIBezierPath *fullBezierPath = [UIBezierPath bezierPathWithRect:self.bounds];
334334
UIBezierPath *scanBezierPath = [UIBezierPath bezierPathWithRect:self.scanRect];
335335
[fullBezierPath appendPath:[scanBezierPath bezierPathByReversingPath]];
336336
CAShapeLayer *shapeLayer = [CAShapeLayer layer];
337337
shapeLayer.path = fullBezierPath.CGPath;
338-
_maskView.layer.mask = shapeLayer;
338+
_coverView.layer.mask = shapeLayer;
339339
}
340-
return _maskView;
340+
return _coverView;
341341
}
342342

343343
- (UIView *)scanLine{

0 commit comments

Comments
 (0)