Commit 9f194207 authored by sanmarcos's avatar sanmarcos Committed by Felix Paul Kühne
Browse files

Open Network Stream: Add a copy action when tapping and holding the cells


Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 9f38ece9
......@@ -182,6 +182,39 @@
[self.historyTableView deselectRowAtIndexPath:indexPath animated:NO];
}
- (void)tableView:(UITableView *)tableView
performAction:(SEL)action
forRowAtIndexPath:(NSIndexPath *)indexPath
withSender:(id)sender
{
NSString *actionText = NSStringFromSelector(action);
if ([actionText isEqualToString:@"copy:"])
{
[UIPasteboard generalPasteboard].string = _recentURLs[indexPath.row];
}
}
- (BOOL)tableView:(UITableView *)tableView
canPerformAction:(SEL)action
forRowAtIndexPath:(NSIndexPath *)indexPath
withSender:(id)sender
{
NSString *actionText = NSStringFromSelector(action);
if ([actionText isEqualToString:@"copy:"])
{
return YES;
}
return NO;
}
- (BOOL)tableView:(UITableView *)tableView shouldShowMenuForRowAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
#pragma mark - internals
- (void)_openURLStringAndDismiss:(NSString *)url
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment