开发者

Touches not cancelled when pushing a new controller in UINavigationController?

开发者 https://www.devze.com 2023-03-08 13:44 出处:网络
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 UINavig

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

精彩评论

暂无评论...
验证码 换一张
取 消