Touches not cancelled when pushing a new controlle

2019-09-01 03:07发布

In Objective-C/Cocoa, I was under the impression that every touchesBegan: call must have a corresponding touchesEnded: or touchesCancelled: call, but this is not the case when a UINavigationController pushes a new view controller. In my testing, whenever a new VC gets pushed, specifically when tapping a button while already moving around one finger, the last touch call in the previous VC is touchesMoved:. Nothing gets cancelled or ended!

Is this behavior correct, and if so, what would be the best way to handle it? Thank you!

0条回答
登录 后发表回答