This question is about the iOS acceptance testing framework KIF.
I have a test step which uses the KIF extension to UIView dragFromPoint:toPoint
. I have a custom view class which implements touchesBegan
/touchesMoved
/touchesEnded
/touchesCancelled
.
From my KIF test step I convert my coordinates to that of my custom view and call dragFromPoint
. NSLog
& breakpoints tell me that touchesBegan
and touchesMoved
are being called on my view but touchesEnded
is not. Looking at the KIF code I can see that it's posting this event but I can't figure out why it's not being delivered to my view when the other two are.
Here is an excerpt of my KIF test step code:
// Convert points to coordinate system of the CoinView
CGPoint coinCenter = [view convertPoint:view.center fromView:view.superview];
CGPoint coinTarget = [view convertPoint:coinSlotTarget fromView:coinSlotView.superview];
[view dragFromPoint:coinCenter toPoint:coinTarget];