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

Support NavigationViews #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Support NavigationViews #17

wants to merge 2 commits into from

Conversation

aaronlab
Copy link

What about change viewDidLoad to viewWillAppear, re-initializing ImageAnalyzer for NavigationView?
When users came back from the subview(result) to the root view(scanner view) in NavigationView, I think that viewDidLoad is not gonna be called.

Comment on lines 74 to 76
override open func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.analyzer = ImageAnalyzer(delegate: self)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, I must have missed this! This implementation results in layoutSubviews and such being called again, which is not desirable. Is re-initializing ImageAnalyzer the best way to address navigation controllers?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omg. I made a mistake.
I needed the feature that the subview which has the card scanner should be called again, which consists of navigation views. The re-initializing code line is from my habbit. I tested it without the line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But anyway, thanks for this library. I'm using this very usefully.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if you feel like this is not desirable, you can just close this pr. Thanks.

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

Successfully merging this pull request may close these issues.

2 participants