Merge branch 'charlesmchen/refineMenuControllerLocation'

pull/1/head
Matthew Chen 8 years ago
commit a755c7e3c4

@ -1200,7 +1200,11 @@ NS_ASSUME_NONNULL_BEGIN
// We "eagerly" respond when the long press begins, not when it ends. // We "eagerly" respond when the long press begins, not when it ends.
if (sender.state == UIGestureRecognizerStateBegan) { if (sender.state == UIGestureRecognizerStateBegan) {
CGPoint location = [sender locationInView:self]; // Show the menu controller from the centroid of the cell,
// not the touch location. This disambiguates which cell
// is the context for the menu if the user presents the menu
// controller from the border between two cells.
CGPoint location = CGPointMake(self.width * 0.5f, self.height * 0.5f);
[self showMenuController:location]; [self showMenuController:location];
} }
} }

Loading…
Cancel
Save