Show menu controller from centroid of message cells.

pull/1/head
Matthew Chen 8 years ago
parent 307c8595c3
commit 08bb1c909d

@ -1200,7 +1200,11 @@ NS_ASSUME_NONNULL_BEGIN
// We "eagerly" respond when the long press begins, not when it ends.
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];
}
}

Loading…
Cancel
Save