Comments (12)
Hey, you need to make sure you're creating a new ImageScannerController()
every time, so you don't accidentally present the old one (which still has the old image). Let me know if you have any troubles after doing this 🙂
from wescan.
That's true - I'm in favor of having a reset function.
from wescan.
If this is agreed on I can make a quick PR (shouldn't be too hard) to add a reset method when I have some time 🙂
from wescan.
Upon further thought, I think we should implement a method to reset the ImageScannerController
to it's original state (I'm thinking of a use case where the controller is displayed in an always-available pull up state from the bottom of the screen). Thoughts?
from wescan.
It can be. I solved my problem your first advice.
from wescan.
Yes, but I think it would still be useful to have a method to reset the controller.
from wescan.
Since it's aUINavigationController
, can't implementors simply pop the view controllers until the one they want @justjs?
from wescan.
While I haven't checked, wouldn't that possibly leave the previously detected rectangle on the scanner screen? Even if it does work I feel like it would be only a workaround, and could easily break if, for example, we add a new screen in the future.
from wescan.
Sounds like a plan! Thanks again for your contributions!
from wescan.
Good day! I end up with the same problem to reset the controller to get various images, so i added this code but i do not think it's the best solution.
In the "ImageScannerController" set this new function
public func reset(){ let scanner = ScannerViewController() self.setViewControllers([scanner], animated: false) navigationBar.tintColor = .black navigationBar.isTranslucent = false self.view.addSubview(blackFlashView) setupConstraints() }
And in the didFinishScanningWithResults call the reset function
scanner.reset()
Could you tell me if there is a better solution?
from wescan.
I'd be happy to create a PR for this if there is still interest in this. Please let me know and I'll go ahead and work on it @julianschiavo @Boris-Em
from wescan.
This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.
from wescan.
Related Issues (20)
- Use VNSequenceRequestHandler instead of VNImageRequestHandler HOT 1
- Should we fix swift lint errors? HOT 1
- Scan Color Change HOT 1
- Corner Detection Error HOT 2
- Change Background Color HOT 2
- From gallery : No such file or directory
- Carthage Dependency "WeScan" has no shared framework schemes HOT 3
- Error: Stored properties cannot be marked unavailable with '@available' HOT 1
- SwiftLint Configuration Error building example project HOT 1
- Lenses in corner selectors show wrong part of image HOT 4
- Compile error building package in Xcode 15.0 beta HOT 9
- iOS 17: Stored properties cannot be marked unavailable with '@available' HOT 1
- Xcode 14 Beta 4 build time error HOT 3
- pod trunk version seems stuck at 1.7 / updating WeScan in a Flutter dependency HOT 2
- Crash happende when we upload large size of image HOT 4
- [!] CocoaPods could not find compatible versions for pod "WeScan": In Podfile: WeScan (~> 3.0.0) HOT 1
- Crash on xcode 15.0 HOT 3
- Stored properties cannot be marked unavailable with '@available' HOT 1
- "Stored properties cannot be marked unavailable with '@available'" HOT 4
- Auto Focus Change Camera or Select Camera HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wescan.