Skip to content

Commit 41f0640

Browse files
committed
Initial commit
1 parent 5b4fa79 commit 41f0640

37 files changed

+136
-140
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
`扫描二维码`<br>
1919

20-
`手动对焦功能`<br>
20+
`捕获内容缩放功能`<br>
2121

2222
`图片中识别二维码`<br>
2323

@@ -34,7 +34,7 @@
3434
| 类名 | 说明 |
3535
|-----|-----|
3636
| SGScanCode | 扫描二维码 |
37-
| SGScanViewConfigure | 扫描视图属性配置 |
37+
| SGScanViewConfigure | 扫描视图配置 |
3838
| SGScanView | 扫描视图 |
3939
| SGPermission | 相册、相机权限管理 |
4040
| SGTorch | 手电筒管理 |
@@ -49,7 +49,7 @@
4949

5050
**通过 CocoaPods 集成**
5151

52-
`pod 'SGQRCode', '~> 4.0.0'`
52+
`pod 'SGQRCode', '~> 4.1.0'`
5353

5454

5555
**Info.plist 添加以下字段**
@@ -98,14 +98,14 @@ scanCode.sampleBufferDelegate = self;
9898
}
9999
```
100100

101-
**图片中识别二维码代码**
101+
**图片中识别二维码方法**
102102
```Objective-C
103103
[scanCode readQRCode:image completion:^(NSString *result) {
104104
<#code#>
105105
}];
106106
```
107107
108-
**生成二维码相关代码**
108+
**生成二维码相关方法**
109109
```Objective-C
110110
// 普通二维码生成方法
111111
[SGGenerateQRCode generateQRCodeWithData:data size:size];
@@ -135,6 +135,8 @@ scanCode.sampleBufferDelegate = self;
135135

136136
* 2022-07-16 :v4.0.0 版本重构:Delegate 取代 Block,新增手动对焦功能,优化拓展扫描视图,更多内容请在 [releases](https://github.com/kingsic/SGQRCode/releases/tag/4.0.0) 中查看
137137

138+
* 2022-07-16 :v4.1.0 优化SGScanView内部代码逻辑,修复无扫描线时,导致程序崩溃问题
139+
138140

139141
## License
140142
SGQRCode is released under the Apache License 2.0. See [LICENSE](https://github.com/kingsic/SGQRCode/blob/master/LICENSE) for details.

SGQRCode.podspec

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

22
Pod::Spec.new do |s|
33
s.name = 'SGQRCode'
4-
s.version = '4.0.0'
4+
s.version = '4.1.0'
55
s.summary = 'The easy to use bar code and QR code scan library for iOS'
66
s.homepage = 'https://github.com/kingsic/SGQRCode'
77
s.license = 'Apache-2.0'

SGQRCode/Category/UIImage+SGQRCode.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

SGQRCode/Category/UIImage+SGQRCode.m

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,28 @@
66
// Copyright © 2022 kingsic. All rights reserved.
77
//
88

9-
#import "SGPermissionEnum.h"
9+
#import <Foundation/Foundation.h>
1010

1111
@class SGPermission;
1212

13+
typedef enum : NSUInteger {
14+
/// 相机
15+
SGPermissionTypeCamera,
16+
/// 相册
17+
SGPermissionTypePhoto,
18+
} SGPermissionType;
19+
20+
typedef enum : NSUInteger {
21+
/// 未授权
22+
SGPermissionStatusNotDetermined,
23+
/// 已授权
24+
SGPermissionStatusAuthorized,
25+
/// 已拒绝
26+
SGPermissionStatusDenied,
27+
/// 受限制
28+
SGPermissionStatusRestricted,
29+
} SGPermissionStatus;
30+
1331
NS_ASSUME_NONNULL_BEGIN
1432

1533
typedef void(^SGPermissionBlock)(SGPermission *permission, SGPermissionStatus status);

SGQRCode/SGPermission/SGPermissionCamera.h renamed to SGQRCode/Permission/SGPermissionCamera.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// Copyright © 2022 kingsic. All rights reserved.
77
//
88

9-
#import "SGPermissionEnum.h"
9+
#import <Foundation/Foundation.h>
10+
#import "SGPermission.h"
1011

1112
@class SGPermissionCamera;
1213

File renamed without changes.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// Copyright © 2022 kingsic. All rights reserved.
77
//
88

9-
#import "SGPermissionEnum.h"
9+
#import <Foundation/Foundation.h>
10+
#import "SGPermission.h"
1011

1112
@class SGPermissionPhoto;
1213

0 commit comments

Comments
 (0)