gpt4 book ai didi

ios - 创建用于读取 QR 码的相机叠加层

转载 作者:行者123 更新时间:2023-12-01 18:06:42 26 4
gpt4 key购买 nike

我正在使用一个使用 QR 码读取功能的应用程序,但我想在相机上进行叠加,例如相机的某些部分将读取 QR 码,而屏幕上的其他 View 将显示模糊效果,假设屏幕尺寸为 375*667所以相机将在 View 的中心打开将帧大小

X: 64pt
Y: 210pt
W: 247.5pt
H: 247.5pt

可以读取代码,屏幕的其他部分将具有透明模糊效果。

最佳答案

也许这些教程会帮助你:

  • YouTube Tutorial by "Jared Davidson" about Custom Camera Views
  • App Coda Tutorial about how to create a barcode reader app (contains information about AVFoundation)

  • The AV Foundation Framework provides the tools that we will use to build our barcode reader. Here’s a little rundown of what’s involved in the process.

    AVCaptureSession will manage data form the camera – input to output. The AVCaptureDevice is the physical device and its properties. AVCaptureSession receives input data from the AVCaptureDevice. AVCaptureDeviceInput captures data from the input device. AVCaptureMetadataOutput forwards metadata objects to be processed by a delegate object.



    也许这会有所帮助:
    How to add a blur mask with a custom shape above a dynamic camera view in Swift?

    关于ios - 创建用于读取 QR 码的相机叠加层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41300685/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com