Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I don't see the close button image on Scanner screen. #11

Open
ShahidIqbal452 opened this issue Jun 24, 2022 · 1 comment
Open

I don't see the close button image on Scanner screen. #11

ShahidIqbal452 opened this issue Jun 24, 2022 · 1 comment

Comments

@ShahidIqbal452
Copy link

I have presented cardScanner ViewController, but it is not showing the close icon at top right corner. Maybe some issue with naming convention but I cant edit your package.
Screenshot 2022-06-24 at 2 49 12 PM

@Aecasorg
Copy link

Aecasorg commented Aug 23, 2022

There are 2 things that are needed to be fixed for the close button to work in this package.
1 - in the SharkCardScanViewController; on line 18, you need to replace $0.setBackgroundImage(UIImage(named: "rounded close"), for: .normal with:

$0.setBackgroundImage(UIImage(systemName: "xmark.circle"), for: .normal)
$0.tintColor = .white

It seems not being able to reach the existing image resource.

2 - In order for the view to dismiss, in the CameraPixelBufferStream on line 38, the sessions need be wrapped to run on the main thread:

DispatchQueue.main.async { [weak self] in
    guard let self = self else { return }
     if newValue {
         self.session.startRunning()
     } else {
         self.session.stopRunning()
    }

Otherwise it takes about 8-9 seconds for the view to be dismissed after you have tapped the close button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants