Skip to content

Commit

Permalink
修改扫一扫的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
seongbrave committed Jul 19, 2018
1 parent 5c2ae51 commit ea428c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion UtilCore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'UtilCore'
s.version = '0.0.1'
s.version = '0.0.2'
s.summary = '项目公用基础库'

# This description is used to generate tags and improve search results.
Expand Down
5 changes: 2 additions & 3 deletions UtilCore/UtilCoreTool/ToolVc/Scan_Vc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ extension Scan_Vc{
extension Scan_Vc: AVCaptureMetadataOutputObjectsDelegate
{
// 只要解析到数据就会调用
public func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputMetadataObjects metadataObjects: [Any]!, from connection: AVCaptureConnection!)
{
public func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection){
// 检查:metadataObjects 对象不为空,并且至少包含一个元素
if metadataObjects == nil || metadataObjects.count == 0 {
if metadataObjects.count == 0 {
return
}
guard let metadataObj = metadataObjects[0] as? AVMetadataMachineReadableCodeObject else {
Expand Down

0 comments on commit ea428c3

Please sign in to comment.