Giter Club home page Giter Club logo

Comments (12)

julianschiavo avatar julianschiavo commented on May 31, 2024 2

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.

Boris-Em avatar Boris-Em commented on May 31, 2024 1

That's true - I'm in favor of having a reset function.

from wescan.

julianschiavo avatar julianschiavo commented on May 31, 2024 1

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.

julianschiavo avatar julianschiavo commented on May 31, 2024

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.

mehyaz avatar mehyaz commented on May 31, 2024

It can be. I solved my problem your first advice.

from wescan.

julianschiavo avatar julianschiavo commented on May 31, 2024

Yes, but I think it would still be useful to have a method to reset the controller.

from wescan.

Boris-Em avatar Boris-Em commented on May 31, 2024

Since it's aUINavigationController, can't implementors simply pop the view controllers until the one they want @justjs?

from wescan.

julianschiavo avatar julianschiavo commented on May 31, 2024

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.

Boris-Em avatar Boris-Em commented on May 31, 2024

Sounds like a plan! Thanks again for your contributions!

from wescan.

OnTheGoFE avatar OnTheGoFE commented on May 31, 2024

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.

EricWiener avatar EricWiener commented on May 31, 2024

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.

github-actions avatar github-actions commented on May 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.