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

Canvas view is not recognising touches after coming from background (device: iPad) #24

Closed
ghost opened this issue May 8, 2019 · 7 comments · Fixed by #32
Closed

Canvas view is not recognising touches after coming from background (device: iPad) #24

ghost opened this issue May 8, 2019 · 7 comments · Fixed by #32
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented May 8, 2019

When the app is sent to background via sliding from the bottom and then opening the app, the touches are not recognizing again and getting below crash.

assert(false, "State not handled") (DrawsanaView.swift -> 302 line)

@stevelandeyasana stevelandeyasana added the bug Something isn't working label May 29, 2019
@stevelandeyasana
Copy link
Collaborator

Thanks for the report. If you disable asserts it probably won't crash in release builds. :-) I'll look into it when I get a chance.

@stevelandeyasana
Copy link
Collaborator

stevelandeyasana commented Jul 18, 2019

@Kiran-appitventures If you disable the assert, does the app keep working normally? It should. So this won't affect production builds.

Still worth a look, of course!

@stevelandeyasana
Copy link
Collaborator

Would you mind trying this branch to see if it fixes the issue? #32

@dneykov
Copy link

dneykov commented Jul 26, 2019

Hello,

I have same problem testing on iPad Air 2

@stevelandeyasana
Copy link
Collaborator

stevelandeyasana commented Jul 26, 2019

OK, did you also try my suggestion? Did it work? Did you try the branch I linked to to see if it fixed the issue?

@dneykov
Copy link

dneykov commented Jul 29, 2019

@stevelandeyasana I just test with the branch with the fix but still crashes but on different line

Assertion failed: State not handled: file /Users/dneykov/Developer/iOS Apps/Schouw/Pods/Drawsana/Drawsana/DrawsanaView.swift, line 301 2019-07-29 10:24:07.900861+0300 Schouw[5333:1463336] Assertion failed: State not handled: file /Users/dneykov/Developer/iOS Apps/Schouw/Pods/Drawsana/Drawsana/DrawsanaView.swift, line 301

@ghost
Copy link
Author

ghost commented Nov 27, 2019

may helpfull as quick fix.. As drawing is not happening when app resigns active screen.. temporarily done workaround.

In Drawsana:

panGR as global variable

public func resetPanGR() {
DispatchQueue.main.async {
self.panGR.state = .ended
self.panGR.reset()
}
}

In my DrawingVC calling this:
@objc private func handleDidBecomeActiveNotification() {
drawingView.resetPanGR()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants