Provide a new mode for detecting when a code is visible
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the existing continuous scanning mode and the ScanResult and ScanError types mentioned in the issue. Trace when the completion handler runs and determine how a visibility-specific mode could report both detected and absent codes; done means the behavior supports the described QR-code button experience and preserves the existing scan modes.
Written by the indexing model from the issue text.
Description
There should be a new scanning mode where the camera is actively detecting the existence of a code.
This new mode should behave similar to how you scan a code in the built-in Camera app.
If the code is visible, complete with the ScanResult.
If the code is not visible, complete with nil or a ScanError.notVisible or something like that.
Context
I'm trying to implement an experience where a button is only visible when a QR code is visible and detected, and hide the button when there is no QR codes visible. this button then runs some logic with the QR code's string value.
Alternatives Tried
I tried using the continuous mode but it only triggers the completion block when a QR code is detected, but it does not tell me if no QR codes are visible yet.
I also tried to use a String? state variable and assign it to nil at the end of the completion block after a delay that is greater than or equal to the scanInterval, but this results in my custom button flickering and doesn't animate well.
- Dominant language
- Swift
- Stars
- 1.2k
- Forks
- 328
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from twostraws/CodeScanner
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
twostraws/CodeScanner#168 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
twostraws/CodeScanner#164 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
twostraws/CodeScanner#163 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
twostraws/CodeScanner#161 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
twostraws/CodeScanner#158 · 1 comment ·
All issues in twostraws/CodeScanner
Similar issues
-
🎉 Add KinetTask Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
jaywcjlove/awesome-mac#2932 ·
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
skiptools/skip-fuse-ui#147 ·
-
area:collectors P2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
catehstn/social-brain-app#183 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100