mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merge pull request #787 from nriley/master
Make 3D Touch work to bring up contextual menus.
This commit is contained in:
commit
f053eafa0f
1 changed files with 10 additions and 1 deletions
|
@ -56,12 +56,21 @@
|
|||
|
||||
case UITouchPhaseEnded:
|
||||
[contextualMenuTimer invalidate];
|
||||
contextualMenuTimer = nil;
|
||||
if (unmoved) {
|
||||
[self tapAction];
|
||||
}
|
||||
break;
|
||||
|
||||
case UITouchPhaseMoved:
|
||||
case UITouchPhaseMoved: // Changes in force are also "moves"
|
||||
if (CGPointEqualToPoint([touch locationInView:self], tapLocation)) {
|
||||
if (touch.force > 0.75) {
|
||||
[contextualMenuTimer invalidate];
|
||||
contextualMenuTimer = nil;
|
||||
[self tapAndHoldAction:nil];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case UITouchPhaseCancelled:
|
||||
unmoved = NO;
|
||||
[contextualMenuTimer invalidate];
|
||||
|
|
Loading…
Add table
Reference in a new issue