Is there a simple way to implement the copy menu when a cell is tapped, instead of subclassing the UITableViewCell?
thanks,
RL
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes!
Call
[[UIMenuController sharedMenuController] setMenuVisible:YES animated:ani](whereaniis aBOOLdetermining whether the controller should be animated) from within- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath( UITableView’s delegate method)Edit: The ‘copy’ command on the
UIMenuControllerwill not by default copy thedetailTextLabel.texttext. However, there is a workaround. Add the following code into your class.